Options
Menu

The Listbox control offers the same functions as the Dropdown control but shows the entries as an open list in the browser.

Hierarchy

Index

Properties

element

element: HTMLSelectElement

Accessors

multiple

  • get multiple(): boolean
  • Retrieves the boolean value indicating whether multiple items can be selected from a list.

    Returns boolean

required

  • get required(): boolean
  • set required(value: boolean): void
  • Check if input is required.

    Returns boolean

  • Set input to required / not required.

    Parameters

    • value: boolean

    Returns void

Methods

checkValidity

  • checkValidity(): Promise<ValidationInfo>

getDisplayValue

  • getDisplayValue(): null | string | string[]
  • Get the current value of the control.

    Returns null | string | string[]

    Display text of the selected option as string.

    • It returns null when no option is selected
    • An array containing the value of each selected option when there is at least one and it is possible to select more.

getValue

  • getValue(): string

hasValue

  • hasValue(): boolean
  • Checking at least one option is selected from current control instance.

    Returns boolean

    It returns true when at least one option is selected.

reload

  • reload(reset: boolean): Promise<void | Error>
  • Reloads the control.

    Parameters

    • reset: boolean

      Reset the control to its first entry.

    Returns Promise<void | Error>

reportValidity

  • reportValidity(): Promise<void>

reset

  • reset(fireEvent: boolean): void

selectFirstEntry

  • selectFirstEntry(triggerOnchange?: "disabled" | "strict" | "always"): void

setDisplayValue

  • setDisplayValue(value: string | string[], settings?: { triggerOnchange: "disabled" | "strict" | "always" }): void
  • Set display value of the control by record id.

    • can be asynchronous, depending on the control type.

    Parameters

    • value: string | string[]

      The display value to be set.

    • Optional settings: { triggerOnchange: "disabled" | "strict" | "always" }
      • triggerOnchange: "disabled" | "strict" | "always"

    Returns void

setValue

  • setValue(value: string | string[], settings?: { triggerOnchange: "disabled" | "strict" | "always" }): void
  • Set value of the control.

    • can be asynchronous, depending on the control type.

    Parameters

    • value: string | string[]

      The unformated raw value to be set.

    • Optional settings: { triggerOnchange: "disabled" | "strict" | "always" }
      • triggerOnchange: "disabled" | "strict" | "always"

    Returns void

triggerOnchange

  • triggerOnchange(): void