Drop Down
(part of package 'Bootstrap Extra Components') Extends designtime/SolutionModel: JSWebComponent Extends runtime: RuntimeWebComponent
Displays a list of menu items. It can be rendered as a standard button or a split button and supports dynamic menu management.
This is a reference page; many components have detailed usage guides here.
Properties
buttonStyleClass
CSS style classes applied specifically to the button part of the Dropdown. Type: Styleclass
enabled
Flag indicating whether the Dropdown is enabled for user interaction. Type: Enabled Default Value: true
imageStyleClass
CSS style classes applied to the image or icon associated with the Dropdown. Type: Styleclass
isButton
Indicates whether the Dropdown is rendered as a standard button. Type: Boolean Default Value: true
isSplitButton
Indicates whether the Dropdown is rendered as a split button. Type: Boolean Default Value: false
menuItems
An array of menu items to be displayed in the Dropdown. Type: Array<CustomType<bootstrapextracomponents-dropdown.MenuItem>>
styleClass
CSS style classes applied to the Dropdown component. Type: Styleclass
text
The text displayed on the Dropdown button. Type: Tagstring
toolTipText
Tooltip text displayed when hovering over the Dropdown. Type: Tagstring
visible
Flag indicating whether the Dropdown is visible. Type: Visible
Events
onAction(event)
Fired when the Dropdown button is activated.
Parameters:
{JSEvent} event The event object containing details about the click event e.g. target element, mouse coordinates
onMenuItemSelected(event,menuItem)
Fired when a menu item within the Dropdown is selected.
Parameters:
{JSEvent} event The event object containing details about the selection event e.g. target element, mouse coordinates
{CustomType<bootstrapextracomponents-dropdown.MenuItem>} menuItem The menu item object that was selected
API
addMenuItem(menuItem)
Adds the given menu item to the Dropdown
Parameters:
{CustomType<bootstrapextracomponents-dropdown.MenuItem>} menuItem MenuItem The bootstrapextracomponents-dropdown.MenuItem item to be added to the Dropdown.
removeMenuItem(itemId)
Removes the menu item with the given item ID
Parameters:
{String} itemId The unique identifier of the menu item to be removed from the Dropdown.
setMenuItems(menuItems)
Sets the menu items of the Dropdown
Parameters:
{Array<CustomType<bootstrapextracomponents-dropdown.MenuItem>>} menuItems An array of bootstrapextracomponents-dropdown.MenuItem items to be set for the Dropdown, replacing any existing items.
Types
MenuItem
Represents a Menu Item for the Dropdown component. scripting type: CustomType<bootstrapextracomponents-dropdown.MenuItem>
enabled
Flag indicating whether the menu item is enabled.
Type: enabled
Default Value: true
iconName
The name of the icon to be displayed alongside the menu item text.
Type: string
isDivider
Flag indicating whether this menu item is a divider.
Type: boolean
itemId
The unique identifier of the menu item.
Type: string
onAction
A handler function that is executed when the menu item is activated.
Type: function
text
The text displayed for the menu item.
Type: tagstring
userData
Optional user data associated with the menu item.
Type: object
Last updated
Was this helpful?