eachParent()
iterates through all the parent items (the immediate parent and its parent, etc until the parent is the component itself)
eachParent(id: Id, callback: DataCallback<T>, self?: boolean): void;
Parameters:
id: string
- the ID of the itemcallback: function
- the function that will be applied to each parent of the itemself: boolean
- optional, defines whether the function should iterate over the specified item itself; false by default
Example
toolbar.data.eachParent("new_btn", item => console.log(item));