Support Menu

Class Dropdown

This class will create a dropdown meant to be used inside the AdvancedSearch component.

It can be, more specifically, used for external code using the AdvancedSearchEvents.buildingAdvancedSearch

Index

Methods

build

  • build(): HTMLElement

getElement

  • getElement(): HTMLElement

getValue

  • getValue(): string

reset

  • reset(): void

select

  • select(index: number, executeOnChange?: boolean): void
  • Select a value from it's 0 based index in the {@link Dropdown.listOfValues}.

    Parameters

    • index: number
    • Default value executeOnChange: boolean = true

    Returns void

Constructors

constructor

  • new Dropdown(onChange?: function, listOfValues: string[], getDisplayValue?: function, label?: string): Dropdown
  • Create a new dropdown.

    Parameters

    • Default value onChange: function = () => {}

      will be called every time the dropdown change it's value. this will be the Dropdown instance.

        • (): void
        • Returns void

    • listOfValues: string[]

      will be the list of selectable values in the dropdown

    • Default value getDisplayValue: function = l

      An optional function that allow to modify the display value vs the actual value from the listOfValues

        • (string: any): string
        • Parameters

          • string: any

          Returns string

    • Optional label: string

      A label/title to display for this dropdown

    Returns Dropdown

Hierarchy

  • Dropdown