Interface DynAdapterSort<T>
Type Parameters
Methods
clear
set
- set(sort): void
Parameters
- sort: DynCompareFn<T> | DynDataSort<T>
A callback function that compares two values. Return > 0 to sort b before a; < 0 to sort a before b; or 0 to keep original order of a & b.
Note: You can set a compare function that also has a subscribe function attached as the
subscribeattribute.
Returns void
- sort: DynCompareFn<T> | DynDataSort<T>
Provides the storage and sequencing of a managed sort function. The sort function set may be a bespoke function or a DynDataSort object containing an
compare, andsubscribeattributes;compareis the only required attribute.Note: You can set a compare function that also has a subscribe function attached as the
subscribeattribute. If a subscribe function is provided the sort function can notify any updates that may change sort order and this triggers an index update.This class forms the public API which is accessible from the
.sortgetter in the main reducer implementation.