ConditionUpdateObserver
Description
Class which is designed for observing changes in condition collection. When condition is changed by user at specified column it’s necessary to update all conditions defined after this edited one.
Object fires update hook for every column conditions change.
Description
Initializes the observer with the Handsontable instance, a condition collection to watch, and an optional factory for column source data.
Members
changes
conditionUpdateObserver.changes : Array
Collected changes when grouping is enabled.
Default: []
grouping
conditionUpdateObserver.grouping : boolean
Flag which determines if grouping events is enabled.
latestEditedColumnPosition
conditionUpdateObserver.latestEditedColumnPosition : number
The latest known position of edited conditions at specified column index.
Default: -1
latestOrderStack
conditionUpdateObserver.latestOrderStack : Array
The latest known order of conditions stack.
Methods
destroy
conditionUpdateObserver.destroy()
Destroy instance.
flush
conditionUpdateObserver.flush()
Flush all collected changes. This trigger update hook for every previously collected change from condition collection.
groupChanges
conditionUpdateObserver.groupChanges()
Enable grouping changes. Grouping is helpful in situations when a lot of conditions is added in one moment. Instead of
trigger update hook for every condition by adding/removing you can group this changes and call flush method to trigger
it once.
updateStatesAtColumn
conditionUpdateObserver.updateStatesAtColumn(column, conditionArgsChange)
Update all related states which should be changed after invoking changes applied to current column.
| Param | Type | Description |
|---|---|---|
| column | number | The column index. |
| conditionArgsChange | object | Object describing condition changes which can be handled by filters on update hook. It contains keys conditionKey and conditionValue which refers to change specified key of condition to specified value based on referred keys. |