Skip to main content

getItem()

returns the object of an item by its id

getItem(id: Id): T;

Parameters:

id: string | number - the id of a selected item

Returns:

The object of an item.

Example

var item = component.data.getItem(123);

Related sample: Data. Get Item

You can access the original properties of an item like this:

var item = component.data.getItem(123);var text = item.text;