Class: ConditionUpdateObserver

ConditionUpdateObserver

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.

Members

changesArray

Collected changes when grouping is enabled.

Default Value: []

columnDataFactoryfunction

Function which provide source data factory for specified column.

conditionCollectionConditionCollection

Reference to the instance of ConditionCollection.

groupingBoolean

Flag which determines if grouping events is enabled.

latestEditedColumnPositionNumber

The latest known position of edited conditions at specified column index.

Default Value: -1

latestOrderStackArray

The latest known order of conditions stack.

Methods

destroy()

Destroy instance.

flush()

Flush all collected changes. This trigger update hook for every previously collected change from condition collection.

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(column, conditionArgsChange)

Update all related states which should be changed after invoking changes applied to current column.

Parameters:
Name Type Description
column
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.