Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ListControl<T>

For now there is no mudule ListControl, it is just class declared in global scope, so to use it as a class (instead of just type hint) you need to declare WB_ListControl global class in your module:

declare class WB_ListControl<T> extends ListControl<T> {};
So do not use it directly, unless you are rewriting old code.

Type parameters

Hierarchy

  • ListControl

Index

Constructors

constructor

  • Parameters

    • opt: object
      • Optional addNewItemsToBeginning?: undefined | false | true
      • Optional editable?: undefined | false | true
      • Optional newItemButtonText?: string | null
      • Optional sortable?: undefined | false | true
      • Optional type?: object | null

    Returns ListControl

Properties

elem

elem: JQuery

lastSelected

lastSelected: T | null

lastSelectedLi

lastSelectedLi: JQuery | null

list

list: JQuery

options

options: object

Type declaration

  • Optional onAdd?: undefined | function
  • Optional onRemove?: undefined | function
  • Optional onSelect?: undefined | function
  • Optional onSelectNone?: undefined | function

Methods

addItem

  • addItem(item: T, noStyleUpdate?: undefined | false | true, icon?: undefined | string, disabled?: undefined | false | true): JQuery
  • Parameters

    • item: T
    • Optional noStyleUpdate: undefined | false | true
    • Optional icon: undefined | string
    • Optional disabled: undefined | false | true

    Returns JQuery

addSeparator

  • addSeparator(): void
  • Returns void

getItems

  • getItems(asInst: boolean): JQuery[] | T[]
  • Parameters

    • asInst: boolean

    Returns JQuery[] | T[]

getItemsLi

  • getItemsLi(): JQuery[]
  • Returns JQuery[]

getValue

  • getValue(): T[]
  • Returns T[]

onSortStart

  • onSortStart(e: object, ui: object): void
  • Parameters

    • e: object
    • ui: object

    Returns void

onSortStop

  • onSortStop(e: object, ui: object): void
  • Parameters

    • e: object
    • ui: object

    Returns void

removeAllItems

  • removeAllItems(): void
  • Returns void

removeItem

  • removeItem(li: JQuery, noStyleUpdate?: undefined | false | true): void
  • Parameters

    • li: JQuery
    • Optional noStyleUpdate: undefined | false | true

    Returns void

selectFirst

  • selectFirst(): void
  • Returns void

selectItemLi

  • selectItemLi(li: JQuery): void
  • Parameters

    • li: JQuery

    Returns void

setHeight

  • setHeight(height: number): void
  • Parameters

    • height: number

    Returns void

setItemIcon

  • setItemIcon(li: HTMLElement | JQuery, icon: string): void
  • Parameters

    • li: HTMLElement | JQuery
    • icon: string

    Returns void

setItemLiEnabled

  • setItemLiEnabled(li: JQuery, enabled: boolean): void
  • Parameters

    • li: JQuery
    • enabled: boolean

    Returns void

setValue

  • setValue(value: T[]): void
  • Parameters

    • value: T[]

    Returns void

updateItem

  • updateItem(li: JQuery): void
  • Parameters

    • li: JQuery

    Returns void

updateStyle

  • updateStyle(): void
  • Returns void