Represents a control that provides a menu of options.

  • Renders the list of select items.

prefix - Renders content before the input.

suffix - Renders content after input.

header - Renders a container before the list of options.

footer - Renders a container after the list of options.

helper-text - Renders content below the input.

toggle-icon - Renders content inside the suffix container.

toggle-icon-expanded - Renders content for the toggle icon when the component is in open state.

value-missing - Renders content when the required validation fails.

custom-error - Renders content when setCustomValidity(message) is set.

invalid - Renders content when the component is in invalid state (validity.valid = false).

list - The list wrapping container for the items of the igc-select.

input - The encapsulated igc-input of the igc-select.

label - The encapsulated text label of the igc-select.

prefix - The prefix wrapper of the input of the igc-select.

suffix - The suffix wrapper of the input of the igc-select.

toggle-icon - The toggle icon wrapper of the igc-select.

helper-text - The helper text wrapper of the igc-select.

Callable

  • Returns ReactNode

Accessors

groups: IgrSelectGroup[]

Returns the groups of the igc-select component.

items: IgrSelectItem[]

Returns the items of the igc-select component.

selectedItem: IgrSelectItem

Returns the selected item from the dropdown or null.

Events

onChange: (args: CustomEvent<IgrSelectItem>) => void

Emitted when the control's checked state changes.

Type declaration

onClosed: (args: CustomEvent<void>) => void

Emitted after the list of options is closed.

Type declaration

onClosing: (args: CustomEvent<void>) => void

Emitter just before the list of options is closed.

Type declaration

onOpened: (args: CustomEvent<void>) => void

Emitted after the list of options is opened.

Type declaration

onOpening: (args: CustomEvent<void>) => void

Emitted just before the list of options is opened.

Type declaration

Methods

  • Removes focus from the component.

    Returns void

  • Resets the current value and selection of the component.

    Returns void

  • Sets focus on the component.

    Parameters

    • options: FocusOptions

    Returns void

  • Navigates to the item with the specified value. If it exists, returns the found item, otherwise - null.

    Parameters

    • value: string

    Returns IgrSelectItem

  • Navigates to the item at the specified index. If it exists, returns the found item, otherwise - null.

    Parameters

    • index: number

    Returns IgrSelectItem

  • Checks the validity of the control and moves the focus to it if it is not valid.

    Returns boolean

  • Selects the item with the specified value. If it exists, returns the found item, otherwise - null.

    Parameters

    • value: string

    Returns IgrSelectItem

  • Selects the item at the specified index. If it exists, returns the found item, otherwise - null.

    Parameters

    • index: number

    Returns IgrSelectItem

Properties

autofocus: boolean

The autofocus attribute of the control.

distance: number

The distance of the select dropdown from its input.

label: string

The label attribute of the control.

outlined: boolean

The outlined attribute of the control.

placeholder: string

The placeholder attribute of the control.

placement: PopoverPlacement

The preferred placement of the select dropdown around its input.

scrollStrategy: PopoverScrollStrategy

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

value: string

The value attribute of the control.