IReadOnlyObservableCollection.findLastIndex - Andrei15193/react-model-view-viewmodel GitHub Wiki
API / IReadOnlyObservableCollection<TItem> / findLastIndex method
Returns the index of the last item that satisfies the given condition.
findLastIndex<TContext>(
predicate: (this: TContext, item: TItem, index: number, collection: this) => boolean,
thisArg?: TContext
): number
Source reference: src/collections/observableCollections/IReadOnlyObservableCollection.ts:125
.
- TContext - The context type in which the callback is executed.
-
predicate: (this:TContext, item:TItem, index:
number
, collection:this
) =>boolean
The callback performing the item check. -
thisArg: TContext
A value to use as context when evaluating items.
Returns: number
Returns the index of the last item for which the provided predicate
evaluates to true
; otherwise -1
.