Skip to main content

getIndex()

returns the index of the item by its id

getIndex(id: Id): number;

Parameters:

id: string - the id of the item

Returns:

The index of the item.

Example

var index = component.data.getIndex("1"); // -> returns 0

Related sample: Data. Get Index