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 select.
input — The encapsulated input of the select.
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.
helper-text — The helper text wrapper of the select.

Whether the control should receive focus automatically.

autofocus: boolean

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

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

The disabled state of the component.

disabled: boolean

Defined in src/internals/mixins/forms/types.ts:30

The distance of the select dropdown from its input.

distance: number = 0

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

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

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

invalid: boolean

Defined in src/internals/mixins/forms/types.ts:37

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

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

keepOpenOnOutsideClick: boolean = false

Defined in src/internals/mixins/combo-box.ts:84

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

Whether the component dropdown should be kept open on selection.

keepOpenOnSelect: boolean = false

Defined in src/internals/mixins/combo-box.ts:72

The label of the control.

label: string

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

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

The name of the control, submitted with the form data.

name: string

Defined in src/internals/mixins/forms/types.ts:43

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

Sets the open state of the component.

open: boolean = false

Defined in src/internals/mixins/combo-box.ts:33

Whether the control has an outlined appearance.

outlined: boolean = false

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

The placeholder text of the control.

placeholder: string

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

The preferred placement of the select dropdown around its input.

placement: PopoverPlacement = 'bottom-start'

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

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

scrollStrategy: PopoverScrollStrategy = 'scroll'

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

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:135

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

get defaultValue(): any

Defined in src/internals/mixins/forms/types.ts:182

The initial value of the component.

set defaultValue(value: unknown): void

Defined in src/internals/mixins/forms/types.ts:182

Parameters

  • value: unknown

Returns void

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

Returns the HTMLFormElement associated with this element.

get form(): HTMLFormElement | null

Defined in src/internals/mixins/forms/types.ts:46

Returns HTMLFormElement | null

Returns the groups of the select component.

get groups(): IgcSelectGroupComponent[]

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

Returns IgcSelectGroupComponent[]

Returns the items of the select component.

get items(): IgcSelectItemComponent[]

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

Returns IgcSelectItemComponent[]

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

get required(): any

Defined in src/internals/mixins/forms/types.ts:207

When set, makes the component a required field for validation.

set required(value: boolean): void

Defined in src/internals/mixins/forms/types.ts:207

Parameters

  • value: boolean

Returns void

Returns the selected item from the dropdown or null.

get selectedItem(): IgcSelectItemComponent | null

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

Returns IgcSelectItemComponent | null

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

A string containing the validation message of this element.

get validationMessage(): string

Defined in src/internals/mixins/forms/types.ts:55

Returns string

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

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/internals/mixins/forms/types.ts:52

Returns ValidityState

get value(): any

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

The value of the control.

set value(value: string | undefined): void

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

Parameters

  • value: string | undefined

Returns void

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

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/internals/mixins/forms/types.ts:61

Returns boolean

Removes focus from the component.

blur(): void

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

Returns void

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

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

checkValidity(): boolean

Defined in src/internals/mixins/forms/types.ts:166

Returns boolean

Resets the current value and selection of the component.

clearSelection(): void

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

Returns void

Sets focus on the component.

focus(options: FocusOptions): void

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

Parameters

  • options: FocusOptions

Returns void

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

Hides the component.

hide(): Promise<boolean>

Defined in src/internals/mixins/combo-box.ts:53

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:698

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:690

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:716

Parameters

  • value: string

Returns IgcSelectItemComponent | null

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

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/internals/mixins/forms/types.ts:175

Parameters

  • message: string

Returns void

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

Shows the component.

show(): Promise<boolean>

Defined in src/internals/mixins/combo-box.ts:48

Returns Promise<boolean>

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

Toggles the open state of the component.

toggle(): Promise<boolean>

Defined in src/internals/mixins/combo-box.ts:58

Returns Promise<boolean>