Represents a control that provides a menu of options.

Element
igc-select
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.

The autofocus attribute of the control.

autofocus: boolean

Defined in src/components/select/select.ts:218

Inherited from: FormAssociatedRequiredMixin( EventEmitterMixin< IgcSelectComponentEventMap, AbstractConstructor<IgcBaseComboBoxLikeComponent> >(IgcBaseComboBoxLikeComponent) )

The disabled state of the component.

disabled: boolean

Defined in src/components/common/mixins/forms/types.ts:29

The distance of the select dropdown from its input.

distance: number = 0

Defined in src/components/select/select.ts:225

Inherited from: FormAssociatedRequiredMixin( EventEmitterMixin< IgcSelectComponentEventMap, AbstractConstructor<IgcBaseComboBoxLikeComponent> >(IgcBaseComboBoxLikeComponent) )

Sets the control into invalid state (visual state only).

invalid: boolean

Defined in src/components/common/mixins/forms/types.ts:36

Inherited from: FormAssociatedRequiredMixin( EventEmitterMixin< IgcSelectComponentEventMap, AbstractConstructor<IgcBaseComboBoxLikeComponent> >(IgcBaseComboBoxLikeComponent) )

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

keepOpenOnOutsideClick: boolean = false

Defined in src/components/common/mixins/combo-box.ts:42

Inherited from: FormAssociatedRequiredMixin( EventEmitterMixin< IgcSelectComponentEventMap, AbstractConstructor<IgcBaseComboBoxLikeComponent> >(IgcBaseComboBoxLikeComponent) )

Whether the component dropdown should be kept open on selection.

keepOpenOnSelect: boolean = false

Defined in src/components/common/mixins/combo-box.ts:31

The label attribute of the control.

label: string

Defined in src/components/select/select.ts:232

Inherited from: FormAssociatedRequiredMixin( EventEmitterMixin< IgcSelectComponentEventMap, AbstractConstructor<IgcBaseComboBoxLikeComponent> >(IgcBaseComboBoxLikeComponent) )

The name attribute of the control.

name: string

Defined in src/components/common/mixins/forms/types.ts:42

Inherited from: FormAssociatedRequiredMixin( EventEmitterMixin< IgcSelectComponentEventMap, AbstractConstructor<IgcBaseComboBoxLikeComponent> >(IgcBaseComboBoxLikeComponent) )

Sets the open state of the component.

open: boolean = false

Defined in src/components/common/mixins/combo-box.ts:49

The outlined attribute of the control.

outlined: boolean = false

Defined in src/components/select/select.ts:211

The placeholder attribute of the control.

placeholder: string

Defined in src/components/select/select.ts:239

The preferred placement of the select dropdown around its input.

placement: PopoverPlacement = 'bottom-start'

Defined in src/components/select/select.ts:245

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

scrollStrategy: PopoverScrollStrategy = 'scroll'

Defined in src/components/select/select.ts:252

The tagName read-only property of the Element interface returns the tag name of the element on which it's called.

MDN Reference

tagName: "igc-select" = 'igc-select'

Defined in src/components/select/select.ts:125

Inherited from: FormAssociatedRequiredMixin( EventEmitterMixin< IgcSelectComponentEventMap, AbstractConstructor<IgcBaseComboBoxLikeComponent> >(IgcBaseComboBoxLikeComponent) )

Returns the HTMLFormElement associated with this element.

get form(): HTMLFormElement | null

Defined in src/components/common/mixins/forms/types.ts:45

Returns HTMLFormElement | null

Returns the groups of the igc-select component.

get groups(): IgcSelectGroupComponent[]

Defined in src/components/select/select.ts:262

Returns IgcSelectGroupComponent[]

Returns the items of the igc-select component.

get items(): IgcSelectItemComponent[]

Defined in src/components/select/select.ts:255

Returns IgcSelectItemComponent[]

Returns the selected item from the dropdown or null.

get selectedItem(): IgcSelectItemComponent | null

Defined in src/components/select/select.ts:269

Returns IgcSelectItemComponent | null

Inherited from: FormAssociatedRequiredMixin( EventEmitterMixin< IgcSelectComponentEventMap, AbstractConstructor<IgcBaseComboBoxLikeComponent> >(IgcBaseComboBoxLikeComponent) )

A string containing the validation message of this element.

get validationMessage(): string

Defined in src/components/common/mixins/forms/types.ts:54

Returns string

Inherited from: FormAssociatedRequiredMixin( EventEmitterMixin< IgcSelectComponentEventMap, AbstractConstructor<IgcBaseComboBoxLikeComponent> >(IgcBaseComboBoxLikeComponent) )

Returns a ValidityState object which represents the different validity states the element can be in, with respect to constraint validation.

get validity(): ValidityState

Defined in src/components/common/mixins/forms/types.ts:51

Returns ValidityState

Inherited from: FormAssociatedRequiredMixin( EventEmitterMixin< IgcSelectComponentEventMap, AbstractConstructor<IgcBaseComboBoxLikeComponent> >(IgcBaseComboBoxLikeComponent) )

A boolean value which returns true if the element is a submittable element that is a candidate for constraint validation.

get willValidate(): boolean

Defined in src/components/common/mixins/forms/types.ts:60

Returns boolean

Removes focus from the component.

blur(): void

Defined in src/components/select/select.ts:564

Returns void

Inherited from: FormAssociatedRequiredMixin( EventEmitterMixin< IgcSelectComponentEventMap, AbstractConstructor<IgcBaseComboBoxLikeComponent> >(IgcBaseComboBoxLikeComponent) )

Checks for validity of the control and emits the invalid event if it invalid.

checkValidity(): boolean

Defined in src/components/common/mixins/forms/types.ts:140

Returns boolean

Resets the current value and selection of the component.

clearSelection(): void

Defined in src/components/select/select.ts:607

Returns void

Sets focus on the component.

focus(options: FocusOptions): void

Defined in src/components/select/select.ts:558

Parameters

  • options: FocusOptions

Returns void

Inherited from: FormAssociatedRequiredMixin( EventEmitterMixin< IgcSelectComponentEventMap, AbstractConstructor<IgcBaseComboBoxLikeComponent> >(IgcBaseComboBoxLikeComponent) )

Hides the component.

hide(): Promise<boolean>

Defined in src/components/common/mixins/combo-box.ts:107

Returns Promise<boolean>

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

navigateTo(value: string): IgcSelectItemComponent | null

Defined in src/components/select/select.ts:577

Parameters

  • value: string

Returns IgcSelectItemComponent | null

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

reportValidity(): boolean

Defined in src/components/select/select.ts:569

Returns boolean

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

select(value: string): IgcSelectItemComponent | null

Defined in src/components/select/select.ts:595

Parameters

  • value: string

Returns IgcSelectItemComponent | null

Inherited from: FormAssociatedRequiredMixin( EventEmitterMixin< IgcSelectComponentEventMap, AbstractConstructor<IgcBaseComboBoxLikeComponent> >(IgcBaseComboBoxLikeComponent) )

Sets a custom validation message for the control. As long as message is not empty, the control is considered invalid.

setCustomValidity(message: string): void

Defined in src/components/common/mixins/forms/types.ts:149

Parameters

  • message: string

Returns void

Inherited from: FormAssociatedRequiredMixin( EventEmitterMixin< IgcSelectComponentEventMap, AbstractConstructor<IgcBaseComboBoxLikeComponent> >(IgcBaseComboBoxLikeComponent) )

Shows the component.

show(): Promise<boolean>

Defined in src/components/common/mixins/combo-box.ts:102

Returns Promise<boolean>

Inherited from: FormAssociatedRequiredMixin( EventEmitterMixin< IgcSelectComponentEventMap, AbstractConstructor<IgcBaseComboBoxLikeComponent> >(IgcBaseComboBoxLikeComponent) )

Toggles the open state of the component.

toggle(): Promise<boolean>

Defined in src/components/common/mixins/combo-box.ts:112

Returns Promise<boolean>