Skip to content

IReadOnlyObservableCollection.indexOf

github-actions[bot] edited this page Nov 17, 2024 · 2 revisions

Returns the first index of an item, or -1 if none can be found.

indexOf(
  searchElement: TItem,
  fromIndex?: number
): number

Source reference: src/collections/observableCollections/IReadOnlyObservableCollection.ts:96.

Parameters

  • searchElement: TItem
    The item to search for.

  • fromIndex: number
    The index from where to start the search, accepts both positive and negative values.

Returns: number

Returns the index where the provided searchElement was first found; otherwise -1.

See also

Clone this wiki locally