Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Item<T>

Type parameters

  • T

Hierarchy

  • Item

Index

Constructors

constructor

  • new Item(title: string, id: string | number, original?: T | null, htmlTitle?: undefined | string, icon?: undefined | string, multiSelect?: undefined | false | true, nonSelectable?: undefined | false | true): Item
  • Create item

    Parameters

    • title: string

      item title

    • id: string | number

      item identificator

    • Optional original: T | null

      descriptor object

    • Optional htmlTitle: undefined | string

      title as html

    • Optional icon: undefined | string

      icon definition style class

    • Optional multiSelect: undefined | false | true

      if true will add checkbox to item

    • Optional nonSelectable: undefined | false | true

      if true item will not be selectable

    Returns Item

Properties

_elem

_elem: JQuery

_id

_id: string | number

_selectFunc

_selectFunc: BasicCallback | null

multiSelect

multiSelect: boolean

nonSelectable

nonSelectable: boolean

Methods

getChecked

  • getChecked(): boolean
  • Returns boolean

getElem

  • getElem(): JQuery
  • Returns JQuery

getId

  • getId(): string | number
  • Returns string | number

getOriginal

  • getOriginal(): T | null
  • Returns T | null

getSelected

  • getSelected(): boolean
  • Returns boolean

getTitle

  • getTitle(): string
  • Returns string

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

setChecked

  • setChecked(checked: boolean): void
  • Parameters

    • checked: boolean

    Returns void

setHtmlTitle

  • setHtmlTitle(title: string): void
  • Parameters

    • title: string

    Returns void

setSelected

  • setSelected(selected: boolean): void
  • Parameters

    • selected: boolean

    Returns void

setTitle

  • setTitle(title: string): void
  • Parameters

    • title: string

    Returns void

Static fromElem

  • fromElem<T>(elem: JQuery): Item<T>
  • Type parameters

    • T

    Parameters

    • elem: JQuery

    Returns Item<T>