Skip to main content


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;


  • id: string - the ID of the item
  • callback: function - the function that will be applied to each parent of the item
  • self: boolean - optional, defines whether the function should iterate over the specified item itself; false by default

Example"new_btn", item => console.log(item));