getId()
gets the ID of an item
getId(index: number, parentId?: string): Id;
Parameters:
index: number
- the index of the itemparentId: string
- the id of the parent of an item
Returns:
The id of the item.
Example
const id = tree.data.getId(2, "1"); -> returns "3"