# Perspective Tree - No component event to detect item expanded?

**URL:** <https://forum.inductiveautomation.com/t/perspective-tree-no-component-event-to-detect-item-expanded/96145>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [September 18, 2024, 6:44pm UTC](https://forum.inductiveautomation.com/t/perspective-tree-no-component-event-to-detect-item-expanded/96145 "2024-09-18T18:44:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![patrixmith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/patrixmith/32/75926_2.png) [@patrixmith](https://forum.inductiveautomation.com/u/patrixmith)\
**Post date:** [September 18, 2024, 6:44pm UTC](https://forum.inductiveautomation.com/t/perspective-tree-no-component-event-to-detect-item-expanded/96145/1 "2024-09-18T18:44:55Z")

</div>

The Perspective Accordion component has an `onItemExpanded` component event, but the Perspective Tree doesn't. It looks like there is only `onItemClicked`, which doesn't fire when the branch node is expanded. Is there any way to gracefully detect that a tree's node has been expanded?

For context, I am looking to build a tree's items dynamically using API calls to get each tree level as the user navigates. The source of the data is tens-of-millions of pieces of equipment in SAP, so rather than build a massive tree with a bunch of nodes the user doesn't care about, and in order to be efficient, I only want to add to the tree's items property as the user expands a node. Once a node is expanded, I would like to call an API to get the children and update the tree only for the expanded node.

I'm currently exploring using the `onItemClicked` and programmatically expanding the node, but it feels hacky because I have to click the label of the node for it to fire, which is not intuitive for users who are used to clicking the expand icon.

---

<div class="post-metadata">

**Author:** ![Muhammad\_Anas](https://avatars.discourse-cdn.com/v4/letter/m/aca169/32.png) [@Muhammad\_Anas](https://forum.inductiveautomation.com/u/Muhammad_Anas)\
**Post date:** [January 29, 2026, 3:57am UTC](https://forum.inductiveautomation.com/t/perspective-tree-no-component-event-to-detect-item-expanded/96145/2 "2026-01-29T03:57:53Z")

</div>

Has you been able to solve this issue? I am having the same exact problem.

---

<div class="post-metadata">

**Author:** ![Bushmatic](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bushmatic/32/87014_2.png) [@Bushmatic](https://forum.inductiveautomation.com/u/Bushmatic)\
**Post date:** [January 29, 2026, 3:17pm UTC](https://forum.inductiveautomation.com/t/perspective-tree-no-component-event-to-detect-item-expanded/96145/3 "2026-01-29T15:17:02Z")

</div>

You can try binding to or putting an event script on the items’ `expanded` properties, but if you need a truly dynamically updating tree, I would think you could put a binding or script on the overarching `items` property. Maybe in the ‘onClick’ event of the component, you can read the `items` property, find newly expanded nodes, call the API, and write back to the `items` property. Haven’t played around with any of this myself.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/2/9260827005e863472c29ee9f25ee5bbcccb95685.png)

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [April 3, 2026, 5:34am UTC](https://forum.inductiveautomation.com/t/perspective-tree-no-component-event-to-detect-item-expanded/96145/4 "2026-04-03T05:34:46Z")

</div>

I’m needing this as well… kinda hard to code anything useful with the Tree without it. Looks like it’s back to JS hacking…
