Class IgcSelectComponent

Hierarchy

  • FormRequiredInterface<this> & FormAssociatedElementInterface<this> & EventEmitterInterface<IgcSelectEventMap, this> & IgcDropdownComponent<this>
    • IgcSelectComponent

Constructors

Properties

autofocus: boolean

The autofocus attribute of the control.

Attr

disabled: boolean

The disabled state of the component

Attr

[disabled=false]

distance: number = 0

The distance from the target element.

Attr

invalid: boolean

Control the validity of the control.

Attr

keepOpenOnOutsideClick: boolean = false

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

Attr

keep-open-on-outside-click

keepOpenOnSelect: boolean = false

Whether the dropdown should be kept open on selection.

Attr

keep-open-on-select

label: string

The label attribute of the control.

Attr

name: string

The name attribute of the control.

Attr

open: boolean = false

Sets the open state of the component.

Attr

outlined: boolean = false

The outlined attribute of the control.

Attr

placeholder: string

The placeholder attribute of the control.

Attr

placement: IgcPlacement = 'bottom-start'

The preferred placement of the component around the target element.

Attr

required: boolean

Makes the control a required field in a form context.

Attr

scrollStrategy: "block" | "close" | "scroll" = 'scroll'

Determines the behavior of the component during scrolling the container.

Attr

scroll-strategy

size: "small" | "medium" | "large"

Determines the size of the component.

Attr

Deprecated

  • since v4.5.0. Use the --ig-size CSS custom property instead.
value?: string

The value attribute of the control.

Attr

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

Accessors

  • get form(): null | HTMLFormElement
  • Returns the HTMLFormElement associated with this element.

    Returns null | HTMLFormElement

  • get validationMessage(): string
  • A string containing the validation message of this element.

    Returns string

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

    Returns ValidityState

  • get willValidate(): boolean
  • A boolean value which returns true if the element is a submittable element that is a candidate for constraint validation.

    Returns boolean

Methods

  • Removes focus from the component.

    Returns void

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

    Returns boolean

  • Clears the current selection of the dropdown.

    Returns void

  • Type Parameters

    Parameters

    • type: K
    • Optional eventInitDict: CustomEventInit<D>

    Returns boolean

  • Type Parameters

    Parameters

    • type: K
    • Optional eventInitDict: CustomEventInit<D>

    Returns boolean

  • Sets focus on the component.

    Parameters

    • Optional options: FocusOptions

    Returns void

  • Hides the dropdown.

    Returns void

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

    Returns boolean

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

    Parameters

    • message: string

    Returns void

  • Shows the dropdown.

    Parameters

    • Optional target: HTMLElement

    Returns void

  • Toggles the open state of the dropdown.

    Parameters

    • Optional target: HTMLElement

    Returns void