Class DataView<T>

Dataview allow different views of the DataStore. You can sort the columns & filter data You can have multiple views for a single DataStore

Type Parameters

Hierarchy

Constructors

Properties

#m_timers: Map<string, Function>
m_filter: FilterInfo
m_index: Uint32Array
m_props: DataViewProps<T>
m_sort: SortProp[]
m_store: DataStore<T>

Accessors

Methods

  • emit an event you can stop propagation of event or prevent default

    Type Parameters

    • K extends keyof DataViewEventMap

    Parameters

    • type: K
    • Optional event: DataViewEventMap[K]

      event data

    Returns void

  • Parameters

    • cb: ((rec, index) => any)
        • (rec, index): any
        • Parameters

          • rec: T
          • index: number

          Returns any

    Returns void

  • stop listening to an event

    Type Parameters

    • K extends keyof DataViewEventMap

    Parameters

    • type: K
    • callback: ((ev) => any)

      callback to remove (must be the same as in on )

        • (ev): any
        • Parameters

          • ev: DataViewEventMap[K]

          Returns any

    Returns void

  • listen for an event

    Type Parameters

    • K extends keyof DataViewEventMap

    Parameters

    • type: K
    • callback: ((ev) => any)

      callback to call

        • (ev): any
        • Parameters

          • ev: DataViewEventMap[K]

          Returns any

    Returns EventDisposer

  • handle an event one time

    Type Parameters

    • K extends keyof DataViewEventMap

    Parameters

    • type: K
    • callback: ((ev) => any)

      callback to call when event is signaled

        • (ev): any
        • Parameters

          • ev: DataViewEventMap[K]

          Returns any

    Returns void

    Promise if callback is null

    take care with that because if the event is never fired and you await it, the system may overflow

  • signal en event signaled event are notification : no way to prevent default not stop propagation

    Type Parameters

    • K extends keyof DataViewEventMap

    Parameters

    • type: K
    • event: DataViewEventMap[K]

      event data

    • delay: number = -1

    Returns void

  • start a new timer

    Parameters

    • name: string

      timer name

    • timeout: number

      time out in ms

    • repeat: boolean = true

      if true this is an auto repeat timer

    • callback: TimerCallback = null

      if !null, the callback to call else a EvTimer is fired

    Returns void

Generated using TypeDoc