ReadOnlyObservableCollection.toSorted - Andrei15193/react-model-view-viewmodel GitHub Wiki
API / ReadOnlyObservableCollection<TItem> / toSorted method
Returns a JavaScript Array containing the items of the collection in ascending order.
public toSorted(
compareCallback?: (a: Exclude<TItem, undefined>, b: Exclude<TItem, undefined>) => number
): TItem[]
Source reference: src/collections/observableCollections/ReadOnlyObservableCollection.ts:661
.
-
compareCallback: (a:Exclude<TItem,
undefined
>, b:Exclude<TItem,undefined
>) =>number
Optional, a callback used to determine the sort order between two items.
A new Array containing the elements sorted in ascending order.