Search code examples
antd

Ant design - Select overwrite dropdown menu position


I have a Select component with a a few options.Right under the Select menu I have a button. Because of the button when I click on the Select to prevent overlap my dropdown menu automatically goes to the top the component. I want to have an overlap, but I don't know how to set a placement of bottomCenter for dropdown in Select. Is it possible to do that without fully overwriting the dropdownRender? Thank you.

My code

return (
    <Select mode="multiple" allowClear style={{ width: '100%'}} 
           placeholder="Search here" onChange={handleChange}> 
        {children}
     </Select>
)

Solution

  • Try this prop: dropdownAlign={{ offset: [-40, 4] }}