getId

gets the ID of an item

string getId(number index,string parentId);

Parameters

indexnumberthe index of the item
parentIdstringthe id of the parent of an item

Returns

stringthe id of the item

Example

const id = tree.data.getId(2, "1"); -> returns "3"

Back to top