Collects and applies the TableStateIf of one table, stores it (AutoRestoreOptionsIf) and reports changes (EventListenerIf.onStateChanged). One instance per TableScope (tableScope.stateService); use the methods of TableApi instead.

Changes are only marked (markDirty); after TableOptionsIf.stateChangedDebounceDelay the dirty parts are computed once, compared with the last reported state, stored with ONE storage write and reported with ONE event – no storage access per scroll frame.

Since

1.1.92

Hierarchy

  • TableStateService

Constructors

Properties

STORAGE_SUFFIX: "tableState" = "tableState"

Suffix of the storage key: <key>tableState.

Methods

  • Applies the parts of a state (only the parts it contains, optionally only the given ones) and repaints. Reports the change with onStateChanged and stores it.

    Parameters

    Returns void

  • First firstInit() only, before tableModel.init(): reads the start state and applies the header groups (they decide which column definitions exist).

    Returns void

  • Back to the state right after the table was built (the code's column layout, sort icons, header groups, without the restored state; tree, checked rows and selection when they are stored or were given as initialState), scrolled to the top, custom data removed – and removes the stored state.

    Returns void