Dropdown
API
Dropdown
Property | Description | Type | Default | Version |
disabled | Whether the dropdown menu is disabled | boolean | - | |
getPopupContainer | To set the container of the dropdown menu. The default is to create a | Function(triggerNode) |
| |
overlay | The dropdown menu | Menu | () => Menu | - | |
overlayClassName | Class name of the dropdown root element | string | - | |
overlayStyle | Style of the dropdown root element | object | - | |
placement | Placement of popup menu: | String |
| |
trigger | The trigger mode which executes the dropdown action. Note that hover can't be used on touchscreens. | Array< |
| |
visible | Whether the dropdown menu is currently visible | boolean | - | |
onVisibleChange | Called when the visible state is changed. | Function(visible) | - |
You should use Menu as overlay
. The menu items and dividers are also available by using Menu.Item
and Menu.Divider
.
Warning: You must set a unique
key
forMenu.Item
.Menu of Dropdown is unselectable by default, you can make it selectable via
<Menu selectable>
.
Dropdown.Button
Property | Description | Type | Default | Version |
disabled | Whether the dropdown menu is disabled | boolean | - | |
icon | Icon (appears on the right) | ReactNode | - | |
overlay | The dropdown menu | - | ||
placement | Placement of popup menu: | String |
| |
size | Size of the button, the same as Button | string |
| |
trigger | The trigger mode which executes the dropdown action | Array< |
| |
type | Type of the button, the same as Button | string |
| |
visible | Whether the dropdown menu is currently visible | boolean | - | |
onClick | The same as Button: called when you click the button on the left | Function | - | |
onVisibleChange | Called when the visible state is changed | Function | - | |
buttonsRender | custom buttons inside Dropdown.Button |
|
Last updated