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 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).
- CSS Parts
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.
Properties
Section titled "Properties"autofocus
Section titled "autofocus"The autofocus attribute of the control.
autofocus: boolean distance
Section titled "distance"The distance of the select dropdown from its input.
distance: number label
Section titled "label"The label attribute of the control.
label: string outlined
Section titled "outlined"The outlined attribute of the control.
outlined: boolean placeholder
Section titled "placeholder"The placeholder attribute of the control.
placeholder: string placement
Section titled "placement"The preferred placement of the select dropdown around its input.
placement: PopoverPlacement scrollStrategy
Section titled "scrollStrategy"Determines the behavior of the component during scrolling of the parent container.
scrollStrategy: PopoverScrollStrategy value
Section titled "value"The value attribute of the control.
value: string Accessors
Section titled "Accessors"groups
Section titled "groups"Returns the groups of the igc-select component.
get groups(): IgrSelectGroupComponent[] Returns IgrSelectGroupComponent[]
items
Section titled "items"Returns the items of the igc-select component.
get items(): IgrSelectItemComponent[] Returns IgrSelectItemComponent[]
selectedItem
Section titled "selectedItem"Returns the selected item from the dropdown or null.
get selectedItem(): IgrSelectItemComponent Returns IgrSelectItemComponent
Methods
Section titled "Methods"Removes focus from the component.
blur(): void Returns void
clearSelection
Section titled "clearSelection"Resets the current value and selection of the component.
clearSelection(): void Returns void
focus
Section titled "focus"Sets focus on the component.
focus(options: FocusOptions): void Parameters
- options:
FocusOptions
Returns void
navigateTo
Section titled "navigateTo"Navigates to the item with the specified value. If it exists, returns the found item, otherwise - null.
navigateTo(value: string): IgrSelectItemComponent Parameters
- value:
string
Returns IgrSelectItemComponent
reportValidity
Section titled "reportValidity"Checks the validity of the control and moves the focus to it if it is not valid.
reportValidity(): boolean Returns boolean
select
Section titled "select"Selects the item with the specified value. If it exists, returns the found item, otherwise - null.
select(value: string): IgrSelectItemComponent Parameters
- value:
string
Returns IgrSelectItemComponent
Events
Section titled "Events"onChange
Section titled "onChange"Emitted when the control's checked state changes.
onChange(args: CustomEvent<IgrSelectItemComponent>): void Parameters
- args:
CustomEvent<IgrSelectItemComponent>
Returns void
onClosed
Section titled "onClosed"Emitted after the list of options is closed.
onClosed(args: CustomEvent<void>): void Parameters
- args:
CustomEvent<void>
Returns void
onClosing
Section titled "onClosing"Emitter just before the list of options is closed.
onClosing(args: CustomEvent<void>): void Parameters
- args:
CustomEvent<void>
Returns void
onOpened
Section titled "onOpened"Emitted after the list of options is opened.
onOpened(args: CustomEvent<void>): void Parameters
- args:
CustomEvent<void>
Returns void
onOpening
Section titled "onOpening"Emitted just before the list of options is opened.
onOpening(args: CustomEvent<void>): void Parameters
- args:
CustomEvent<void>