SparseIndexHelper
Helpers for working with sparseIndex fields on records.
A sparseIndex is a number field that is used to sort records in a Store. It can have gaps and fractional values. SparseIndexes are unique among all records in a flat Store, i.e. no two records in a Store should have the same sparseIndex value. In case of a TreeStore, sparseIndexes are unique only among sibling records. The main purpose of a sparseIndex is to allow reordering of records without having to update the sparseIndex of every record in the Store. New records can be assigned a sparseIndex that is between the sparseIndexes of two existing records.
Properties
1
Properties
1Functions
1
Functions
1Consolidates sparse indexes on the passed records, making them sequential numbers. Use this to avoid having duplicate values. IMPORTANT: Only use this on sorted records, otherwise it might create duplicate sparse indexes again!
| Parameter | Type | Description |
|---|---|---|
records | Model[] | |
fieldName | string |