Class IgcDropdownComponent

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

  • Renders the dropdown list items.

Csspart

base - The dropdown list wrapper.

Csspart

list - The dropdown list.

Hierarchy

Hierarchy

  • SizableInterface<this> & EventEmitterInterface<IgcDropdownEventMap, this> & IgcBaseComboBoxLikeComponent<this>
    • IgcDropdownComponent

Constructors

Properties

distance: number = 0

The distance from the target element.

Attr

emitEvent: (<K, D>(type, eventInitDict?) => boolean) & (<K, D>(event, eventInitDict?) => boolean)
flip: boolean = false

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.

Attr

keepOpenOnOutsideClick: boolean = false

Whether the component dropdown should be kept open on clicking outside of it.

Attr

keep-open-on-outside-click

keepOpenOnSelect: boolean = false

Whether the component dropdown should be kept open on selection.

Attr

keep-open-on-select

open: boolean = false

Sets the open state of the component.

Attr

placement: IgcPlacement = 'bottom-start'

The preferred placement of the component around the target element.

Attr

positionStrategy: "fixed" | "absolute" = 'absolute'

Sets the component's positioning strategy.

Attr

position-strategy

sameWidth: boolean = false

Whether the dropdown's width should be the same as the target's one.

Attr

same-width

scrollStrategy: "block" | "close" | "scroll" = 'scroll'

Determines the behavior of the component during scrolling of the parent container.

Attr

scroll-strategy

size: "small" | "medium" | "large"

Determines the size of the component.

Attr

Deprecated

since v4.5.0. Use the --ig-size CSS custom property instead.

styles: CSSResult[] = ...
tagName: "igc-dropdown" = 'igc-dropdown'

Accessors

Methods

  • Returns void

  • Hides the component.

    Returns void

  • Shows the component.

    Parameters

    • Optional target: string | HTMLElement

    Returns void

  • Toggles the open state of the component.

    Parameters

    • Optional target: string | HTMLElement

    Returns void