Represents a control that provides a menu of options.

Slots
default — Renders the list of select items.
prefix — Renders content before the input.
suffix — Renders content after the 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 that replaces the default toggle icon.
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).
CSS Parts
base — The popup container of the list of options.
list — The list wrapping container for the items of the select.
input — The encapsulated input of the select.
native-input — The native input element of the encapsulated input.
label — The encapsulated text label of the select.
prefix — The prefix wrapper of the input of the select.
suffix — The suffix wrapper of the input of the select.
toggle-icon — The toggle icon wrapper of the select.
filled — Added to the toggle-icon part when the select has a value.
helper-text — The helper text wrapper of the select.

Whether the control takes the focus after its first render.

autofocus: boolean

The distance of the select dropdown from its input.

distance: number

Whether the component stays open when the user clicks outside of it.

keepOpenOnOutsideClick: boolean

Whether the component stays open after the user selects an item.

keepOpenOnSelect: boolean

The label of the control.

label: string

Whether the component is open.

open: boolean

Whether the control has an outlined appearance.

outlined: boolean

The placeholder text of the control.

placeholder: string

The preferred placement of the select dropdown around its input.

placement: PopoverPlacement

The behavior of the component when a parent container scrolls.

If the value is hide, the component hides while the anchor is fully out of view. hide is the default value.

If the value is scroll, the component stays visible and anchored.

If the value is close, the component closes on each scroll.

scrollStrategy: PopoverScrollStrategy

The value of the control.

value: string | undefined

Returns the groups of the select component.

get groups(): IgrSelectGroupComponent[]

Returns IgrSelectGroupComponent[]

Returns the items of the select component.

get items(): IgrSelectItemComponent[]

Returns IgrSelectItemComponent[]

Returns the selected item from the dropdown or null.

get selectedItem(): IgrSelectItemComponent | null

Returns IgrSelectItemComponent | null

Removes focus from the component.

blur(): void

Returns void

Resets the current value and selection of the component.

clearSelection(): void

Returns void

Sets focus on the component.

focus(options: FocusOptions): void

Parameters

  • options: FocusOptions

Returns void

Closes the component. It does not emit events. The promise resolves to false when the component is already closed, or when a later call replaces this one.

hide(): Promise<boolean>

Returns Promise<boolean>

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

navigateTo(value: string): IgrSelectItemComponent | null

Parameters

  • value: string

Returns IgrSelectItemComponent | null

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

select(value: string): IgrSelectItemComponent | null

Parameters

  • value: string

Returns IgrSelectItemComponent | null

Opens the component. It does not emit events. The promise resolves to false when the component is already open, or when a later call replaces this one.

show(): Promise<boolean>

Returns Promise<boolean>

Opens the component when it is closed, and closes it when it is open. It does not emit events. The promise resolves to true when the state changes.

toggle(): Promise<boolean>

Returns Promise<boolean>

Emitted when the user selects a different item. The detail is the item.

onChange(args: CustomEvent<IgrSelectItemComponent>): void

Parameters

Returns void

Emitted after the list of options closes on a user action.

onClosed(args: CustomEvent<void>): void

Parameters

Returns void

Emitted before the user closes the list of options. Cancelable.

onClosing(args: CustomEvent<void>): void

Parameters

Returns void

Emitted after the list of options opens on a user action.

onOpened(args: CustomEvent<void>): void

Parameters

Returns void

Emitted before the user opens the list of options. Cancelable.

onOpening(args: CustomEvent<void>): void

Parameters

Returns void