-
Notifications
You must be signed in to change notification settings - Fork 2
ReadOnlyObservableCollection.toSorted
API / ReadOnlyObservableCollection<TItem> / toSorted method
Returns a JavaScript Array containing the items of the collection in ascending order.
This is a public method.
public toSorted(compareFn?: (a: TItem, b: TItem) => number): TItem[]
-
compareFn: Function, optional, a callback used to determine the sort order between two items.
- a: TItem, the first item for comparison.
- b: TItem, the second item for comparison.
Returns the comparison result. Less thanReturns: Number
0
(zero) meansa
is less thanb
, greater than0
(zero) meansa
is greater thanb
, and0
(zero) means the two items are equal.
Returns: TResult[]
A new Array with the elements sorted in ascending order.
Motivation
Overview
Guides and Tutorials - Getting Started
Releases
API
Events
IEvent
IEventHandler
INotifyPropertiesChanged
INotifyCollectionChanged
IItemAddedEventArgs
IItemRemovedEventArgs
ICollectionChange
ItemRemovedCallback
ICollectionChange
EventDispatcher
Observable Collections
IReadOnlyObservableCollection
IObservableCollection
ReadOnlyObservableCollection
ObservableCollection
ViewModels
ViewModel
isViewModel
Forms
IFormFieldViewModel
IFormFieldViewModelConfig
FormFieldViewModel
FormFieldCollectionViewModel
FormFieldSet
DynamicFormFieldCollectionViewModel
Validation
IReadOnlyValidatable
IValidatable
IValidationConfig
ValidatorCallback
CollectionItemValidatorCallback
ValidatableSelectorCallback
ValidationConfigSelectorCallback
UnsubscribeCallback
registerValidators
registerCollectionValidators
registerCollectionItemValidators
React Hooks
EventHandler
useEvent
ViewModelType
ViewModelFactory
useViewModel
useViewModelMemo
useObservableCollection
useValidators
useCollectionValidators
useCollectionItemValidators