Skip to main content

ElementCreateDropdown

Callable

  • ElementCreateDropdown(id, optionsList, onChange, options, htmlOptions): HTMLSelectElement

  • Construct a <select>-based dropdown menu.


    Parameters

    • id: string

      The name of the select item.

    • optionsList: readonly (string | HTMLOptions<hr> | Omit<HTMLOptions<option>, tag>)[]

      The list of options for the current select statement. Can be supplied as a simple string or a more extensive <option> config.

    • onChange: (this, event) => any

      An event listener to be called, when the value of the drop down box changes

      • optionaloptions: { disabled?: boolean; multiple?: boolean; name?: string; required?: boolean; size?: number } = null

        Additional <select>-specific properties

        • optionaldisabled: boolean
        • optionalmultiple: boolean
        • optionalname: string
        • optionalrequired: boolean
        • optionalsize: number
      • htmlOptions: Partial<Record<select, Omit<HTMLOptions<select>, tag>>> = null

        Additional ElementCreate options to-be applied to the respective (child) element

      Returns HTMLSelectElement

      • The created element