x4js - v2.2.49
    Preparing search index...

    Class DataView

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

    Hierarchy (View Summary)

    Index
    m_filter: FilterInfo
    m_index: DataIndex
    m_model: DataModel
    m_props: DataViewProps
    m_sort: SortProp[]
    m_store: DataStore
    • Clears all timeouts and intervals currently managed by this instance. This stops all scheduled callbacks and removes their references.

      Returns void

      setTimeout

    • Dispatches an event with a given name and payload to all registered listeners. If no listeners are registered for the event name, or if no EventSource has been initialized, this method does nothing.

      Type Parameters

      • K extends "view_change"

      Parameters

      • name: K

        The name of the event to fire.

      • ev: DataViewEventMap[K]

        The payload (event object) to pass to the listeners.

      Returns void

      • on
      • off
    • Removes a previously registered event listener. If the listener was not found or no events were registered, this method does nothing.

      Type Parameters

      • K extends "view_change"

      Parameters

      • name: K

        The name of the event from which to remove the listener.

      • listener: (ev: DataViewEventMap[K]) => void

        The specific listener function to remove.

      Returns void

      • on
      • fire
    • Registers an event listener for a specific event name. The listener will be invoked when an event with the given name is fired. Returns an object with an off() method, which can be used to conveniently remove this specific listener.

      Type Parameters

      • K extends "view_change"

      Parameters

      • name: K

        The name of the event to listen for.

      • listener: (ev: DataViewEventMap[K]) => void

        The callback function to execute when the event is fired.

      Returns { off: () => void }

      An object containing an off() method to unsubscribe the listener.

      fire attach to an event

    • Sets an interval that repeatedly executes a callback function after a specified delay. If a timeout with the same name already exists, it will be cleared before the new one is set.

      Parameters

      • name: string

        A unique string identifier for this timeout.

      • ms: number

        The delay in milliseconds before the callback is executed.

      • callback: () => void

        The function to execute after the delay.

      Returns void

    • Sets a timeout that executes a callback function after a specified delay. If a timeout with the same name already exists, it will be cleared before the new one is set.

      Parameters

      • name: string

        A unique string identifier for this timeout.

      • ms: number

        The delay in milliseconds before the callback is executed.

      • callback: () => void

        The function to execute after the delay.

      Returns void