FormCollection.sort - Andrei15193/react-model-view-viewmodel GitHub Wiki
API / FormCollection<TForm, TValidationError> / sort method
This method overrides ReadOnlyFormCollection.sort.
Reverses the items in the collections and returns the observable collection.
public sort(
compareCallback?: (left: Exclude<TForm, undefined>, right: Exclude<TForm, undefined>) => number
): this
Source reference: src/forms/FormCollection.ts:115
.
-
compareCallback: (left:Exclude<TForm,
undefined
>, right:Exclude<TForm,undefined
>) =>number
Optional, a callback used to determine the sort order between two items.
Returns: this
The observable collection on which the operation is performed.