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

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

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

Whether the control is disabled. A disabled control is not validated, and the form does not submit its value.

disabled: boolean

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

The distance of the select dropdown from its input.

distance: number = 0

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

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

Whether the control shows the invalid state. It changes only the visual state, not the validity.

invalid: boolean

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

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

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

keepOpenOnOutsideClick: boolean = false

Defined in src/internals/bases/combo-box.ts:170

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

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

keepOpenOnSelect: boolean = false

Defined in src/internals/bases/combo-box.ts:158

The label of the control.

label: string

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

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

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

name: string

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

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

Whether the component is open.

open: boolean = false

Defined in src/internals/bases/combo-box.ts:50

Whether the control has an outlined appearance.

outlined: boolean = false

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

The placeholder text of the control.

placeholder: string

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

The preferred placement of the select dropdown around its input.

placement: PopoverPlacement = 'bottom-start'

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

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

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 = 'hide'

Defined in src/internals/bases/combo-box.ts:65

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

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

get defaultValue(): any

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

The default value of the control. A form reset restores the value to it. While the value is unchanged since the start or the last form reset, a new default also sets the value. The value attribute also sets it.

set defaultValue(value: unknown): void

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

Parameters

  • value: unknown

Returns void

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

The form that the control is associated with, or null.

get form(): HTMLFormElement | null

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

Returns HTMLFormElement | null

Returns the groups of the select component.

get groups(): IgcSelectGroupComponent[]

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

Returns IgcSelectGroupComponent[]

Returns the items of the select component.

get items(): IgcSelectItemComponent[]

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

Returns IgcSelectItemComponent[]

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

get required(): any

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

Whether the control is required. A required control that has no value, or is not checked, fails validation.

set required(value: boolean): void

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

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

Returns IgcSelectItemComponent | null

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

The validation message of the control. It is empty when the control is valid.

get validationMessage(): string

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

Returns string

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

The validity state of the control.

get validity(): ValidityState

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

Returns ValidityState

get value(): any

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

The value of the control.

set value(value: string | undefined): void

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

Parameters

  • value: string | undefined

Returns void

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

Whether the control is a candidate for constraint validation.

get willValidate(): boolean

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

Returns boolean

Removes focus from the component.

blur(): void

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

Returns void

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

Checks validity and emits invalid when the control is invalid. Returns true when the control is valid.

checkValidity(): boolean

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

Returns boolean

Resets the current value and selection of the component.

clearSelection(): void

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

Returns void

Sets focus on the component.

focus(options: FocusOptions): void

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

Parameters

  • options: FocusOptions

Returns void

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

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>

Defined in src/internals/bases/combo-box.ts:135

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

Parameters

  • value: string

Returns IgcSelectItemComponent | null

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

Checks validity. As for a native control, an invalid control emits invalid and takes the focus. It shows its own validation messages, not the message of the browser. Returns true when the control is valid.

reportValidity(): boolean

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

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

Parameters

  • value: string

Returns IgcSelectItemComponent | null

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

Sets a custom validation message. The control is invalid while the message is not empty. An empty string removes the custom error.

setCustomValidity(message: string): void

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

Parameters

  • message: string

Returns void

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

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>

Defined in src/internals/bases/combo-box.ts:126

Returns Promise<boolean>

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

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>

Defined in src/internals/bases/combo-box.ts:144

Returns Promise<boolean>