Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DropdownBox<T>

Type parameters

Hierarchy

Implements

Index

Constructors

constructor

Properties

Static Item

Item: any

Methods

addClass

  • addClass(cls: string): this

addItem

  • addItem(item: Item<T>): void
  • Parameters

    Returns void

addMenuStyleClass

  • addMenuStyleClass(styleClass: string): void
  • Parameters

    • styleClass: string

    Returns void

buildInit

css

  • css(css: object): this
  • Parameters

    • css: object
      • [key: string]: any

    Returns this

getElem

  • getElem(): JQuery

getItem

  • getItem(index: number): Item<T> | null
  • Parameters

    • index: number

    Returns Item<T> | null

getItemById

  • getItemById(id: string | number): Item<T> | null
  • Parameters

    • id: string | number

    Returns Item<T> | null

getItems

  • getItems(): Item<T>[]

getOpen

  • getOpen(): boolean
  • Returns boolean

getSelectedItem

  • getSelectedItem(): Item<T> | null
  • Get selected item in single-select mode

    Returns Item<T> | null

getSelectedItems

  • getSelectedItems(): Item<T>[]
  • Get selected item list in multi-select mode

    Returns Item<T>[]

getValue

  • getValue(multiSelect?: undefined | false | true): string | number | string[] | number[] | null
  • Parameters

    • Optional multiSelect: undefined | false | true

    Returns string | number | string[] | number[] | null

getWrappedControl

  • getWrappedControl(): object | null

off

  • off(event: string, func: function): this
  • Parameters

    • event: string
    • func: function
        • (): void
        • Returns void

    Returns this

on

  • on(event: string, func: function): this
  • Parameters

    • event: string
    • func: function
        • (): void
        • Returns void

    Returns this

onEdit

  • onEdit(fields: object): void
  • Parameters

    • fields: object

    Returns void

onOpen

  • onOpen(): void
  • Returns void

onSelectAllClick

  • onSelectAllClick(e: MouseEvent): void
  • Parameters

    • e: MouseEvent

    Returns void

reload

  • reload(fromSource?: T[] | null): void
  • Parameters

    • Optional fromSource: T[] | null

    Returns void

removeAllItem

  • removeAllItem(): void
  • Returns void

removeAllItems

  • removeAllItems(): void
  • Returns void

removeClass

  • removeClass(cls: string): this

removeItem

  • removeItem(item: Item<T>): void
  • Parameters

    Returns void

selectItem

  • selectItem(item: Item<T> | null, select?: undefined | false | true, updateValueAndStyles?: undefined | false | true): void
  • Select item. If item is null and select is false, then will unselect all items in multi-select mode.

    Parameters

    • item: Item<T> | null

      item to be selected

    • Optional select: undefined | false | true

      item selection state (only valid on multi-select items)

    • Optional updateValueAndStyles: undefined | false | true

      Tells if value text and styles of items in the drop down should be updated.

    Returns void

setEditable

  • setEditable(editable: boolean): void
  • Parameters

    • editable: boolean

    Returns void

setEnabled

  • setEnabled(enabled: boolean): void

setMultilevel

  • setMultilevel(multilevel: boolean): void
  • Parameters

    • multilevel: boolean

    Returns void

setOpen

  • setOpen(open: boolean): void
  • Parameters

    • open: boolean

    Returns void

setTitle

  • setTitle(title: string): this

setTooltip

  • setTooltip(value: string | boolean, placement?: undefined | string, trigger?: undefined | string): void
  • Parameters

    • value: string | boolean
    • Optional placement: undefined | string
    • Optional trigger: undefined | string

    Returns void

setValue

  • setValue(value: string | number | string[] | number[] | null, multiSelect?: undefined | false | true): void
  • Parameters

    • value: string | number | string[] | number[] | null
    • Optional multiSelect: undefined | false | true

    Returns void

setVisible

  • setVisible(visible: boolean): this

trigger

  • trigger(event: string, extraParameters?: any): this
  • Parameters

    • event: string
    • Optional extraParameters: any

    Returns this

updateValueText

  • updateValueText(): void
  • Returns void

Static wrapControl