ReadOnlyObservableCollection.findIndex - Andrei15193/react-model-view-viewmodel GitHub Wiki

Returns the index of the first item that satisfies the given condition.

public findIndex<TContext = void>(
  predicate: (this: TContext, item: TItem, index: number, collection: this) => boolean,
  thisArg?: TContext
): number

Source reference: src/collections/observableCollections/ReadOnlyObservableCollection.ts:572.

Generic Parameters

  • TContext - The context type in which the callback is executed.

    Default value: void.

Parameters

  • 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 first item for which the provided predicate evaluates to true; otherwise -1.

See also

⚠️ **GitHub.com Fallback** ⚠️