StoreChained
Configs
10
Configs
10Array of field names that should trigger filtering of chained store when the fields are updated.
Function used to filter records in the masterStore into a chained store. If not provided,
all records from the masterStore will be included in the chained store.
Return true to include the passed record, or a false to exclude it.
| Parameter | Type | Description |
|---|---|---|
record | Model |
If true, chained stores will apply filters from the master store. Filters flagged with ignoreForChain
will be ignored.
Method names calls to which shouldn't be relayed to master store.
Method names calls to which should be relayed to master store.
If true, collapsed records in original tree will be excluded from the chained store.
chainTree()Set to true to prevent including links (when grouping by array field)
Master store that a chained store gets its records from.
If true, changing the order of records in a flat chained store (for example by using the RowReorder
feature in a Grid-based widget) will also change the order of records in the master store.
Example usage:
store.chain(record => record.percent < 10, null, {
syncOrder : true
});
A B C D E, and the chained store has E C A, it will be difficult for users to
predict the outcome of moving E to between C A.If true, chained stores will be sorted when the master store is sorted. Note that this replaces
any existing sorters defined on the chained store.
Properties
3
Properties
3Advanced
Is this a chained store?
Class hierarchy
Functions
3
Functions
3Creates a chained store, a new Store instance that contains a subset of the records from current store. Which records is determined by a filtering function, which is reapplied when data in the base store changes.
// Chain all records
const all = store.chain();
// Or a subset using a filter function
const oldies = store.chain(record => record.age > 50);
If this store is a tree store, then the resulting chained store
will be a tree store sharing the same root node, but only child nodes which pass the chainedFilterFn will be
considered when iterating the tree through the methods such as
traverse or forEach.
| Parameter | Type | Description |
|---|---|---|
chainedFilterFn | function | An optional filter function called for every record to determine if it should
be included (return |
chainedFields | String[] | Array of fields that trigger filtering when they are updated |
config | StoreConfig | Additional chained store configuration. See Store#configs |
Creates a chained tree store, a new Store instance that contains a subset of the records from current store. Which records is determined by a filtering function, which is reapplied when data in the base store changes.
// Chain all nodes
const fullTree = store.chainTree();
// Or a subset
const oldies = store.chainTree(record => record.age > 50);
The resulting chained store will be a tree store with its own root node, under which all children are links to the nodes in this store. This allows for expanding/collapsing and filtering nodes in the chained store without affecting the original store.
| Parameter | Type | Description |
|---|---|---|
chainedFilterFn | function | An optional filter function called for every leaf record to determine if it
should be included (return |
chainedFields | String[] | Array of fields that trigger filtering when they are updated |
config | StoreConfig | Additional chained store configuration. See Store#configs |
Updates records available in a chained store by filtering the master store records using chainedFilterFn