The distance from the target element.
Whether the component should be flipped to the opposite side of the target once it's about to overflow the visible area. When true, once enough space is detected on its preferred side, it will flip back.
Whether the component dropdown should be kept open on clicking outside of it.
Whether the component dropdown should be kept open on selection.
Sets the open state of the component.
The preferred placement of the component around the target element.
Whether the dropdown's width should be the same as the target's one.
Determines the behavior of the component during scrolling of the parent container.
Static
Readonly
tagReturns the HTML-uppercased qualified name.
Returns the group items of the dropdown.
Returns the items of the dropdown.
Returns the selected item from the dropdown or null.
Clears the current selection of the dropdown.
Hides the component.
Navigates to the item with the specified value. If it exists, returns the found item, otherwise - null.
Navigates to the item at the specified index. If it exists, returns the found item, otherwise - null.
Selects the item with the specified value. If it exists, returns the found item, otherwise - null.
Selects the item at the specified index. If it exists, returns the found item, otherwise - null.
Shows the component.
Toggles the open state of the component.
Invoked when the component is removed from the document's DOM.
This callback is the main signal to the element that it may no longer be
used. disconnectedCallback()
should ensure that nothing is holding a
reference to the element (such as event listeners added to nodes external
to the element), so that it is free to be garbage collected.
disconnectedCallback() {
super.disconnectedCallback();
window.removeEventListener('keydown', this._handleKeydown);
}
An element may be re-connected after being disconnected.
Represents a DropDown component.
Element
igc-dropdown
Fires
igcChange - Emitted when the selected item changes.
Fires
igcOpening - Emitted just before the dropdown is open.
Fires
igcOpened - Emitted after the dropdown is open.
Fires
igcClosing - Emitter just before the dropdown is closed.
Fires
igcClosed - Emitted after closing the dropdown.
Slot
target - Renders the dropdown's target element.
Slot
Csspart
base - The dropdown list wrapper container.
Csspart
list - The dropdown list element.