-
Notifications
You must be signed in to change notification settings - Fork 2
ReadOnlyObservableCollection.findLastIndex
API / ReadOnlyObservableCollection<TItem> / findLastIndex method
Returns the index of the last item for which the provided predicate
evaluated to true
, if no item can be found then -1
is returned.
This is a public method.
public findLastIndex(predicate: (item: TItem, index: number, collection: IReadOnlyObservableCollection<TItem>) => boolean): number
-
predicate: Function, the callback performing the item check.
- item: TItem, the item being evaluated.
- index: Number, the index of the item being evaluated.
- collection: IReadOnlyObservableCollection<TItem>, the collection being iterated.
ReturnsReturns: Boolean
true
if the provided item satisfies the condition;false
otherwise.
Returns: Number
Returns the index of the last item for which the provided predicate
evaluates to true
; otherwise -1
.
Returns the index of the last item for which the provided predicate
evaluated to true
, if no item can be found then -1
is returned.
This is a public method.
public findLastIndex<TContext>(predicate: (item: TItem, index: number, collection: IReadOnlyObservableCollection<TItem>) => boolean, thisArg: TContext): number
- TContext: the context type in which the callback is executed.
-
predicate: Function, the callback performing the item check.
- item: TItem, the item being evaluated.
- index: Number, the index of the item being evaluated.
- collection: IReadOnlyObservableCollection<TItem>, the collection being iterated.
ReturnsReturns: Boolean
true
if the provided item satisfies the condition;false
otherwise. - thisArg: TContext, a value to use as context when checking items.
Returns: Number
Returns the index of the last item for which the provided predicate
evaluates to true
; otherwise -1
.
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