# \[Bug-5344\] onClick event doesn't work on perspective tree component

**URL:** <https://forum.inductiveautomation.com/t/bug-5344-onclick-event-doesnt-work-on-perspective-tree-component/54297>\
**Category:** Ignition Early Access\
**Tags:** perspective\
**Created:** [December 20, 2021, 11:25am UTC](https://forum.inductiveautomation.com/t/bug-5344-onclick-event-doesnt-work-on-perspective-tree-component/54297 "2021-12-20T11:25:20Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [December 20, 2021, 11:25am UTC](https://forum.inductiveautomation.com/t/bug-5344-onclick-event-doesnt-work-on-perspective-tree-component/54297/1 "2021-12-20T11:25:20Z")

</div>

Hello

In Ignition 8.1.12 the onClick event of the perspective tree component was never triggered.  
As the onItemClick event doesn’t support ctrl key press detection I need to use this one.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [December 20, 2021, 4:02pm UTC](https://forum.inductiveautomation.com/t/bug-5344-onclick-event-doesnt-work-on-perspective-tree-component/54297/2 "2021-12-20T16:02:15Z")

</div>

I just checked the onClick Event for the Tree component and it’s working as expected in 8.1.12. Can you give some more insight into what you’re doing with it and how it isn’t working?

---

<div class="post-metadata">

**Author:** ![jespinmartin1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jespinmartin1/32/57175_2.png) [@jespinmartin1](https://forum.inductiveautomation.com/u/jespinmartin1)\
**Post date:** [December 20, 2021, 5:33pm UTC](https://forum.inductiveautomation.com/t/bug-5344-onclick-event-doesnt-work-on-perspective-tree-component/54297/3 "2021-12-20T17:33:07Z")

</div>

Regarding this, wouldn’t be cool to create a prop for multiple selection in this component. Without the usage or “Ctrl”.  
I did have to warn the customer that they will only be able to do multiple selection in a device with keyboard.

---

<div class="post-metadata">

**Author:** ![jespinmartin1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jespinmartin1/32/57175_2.png) [@jespinmartin1](https://forum.inductiveautomation.com/u/jespinmartin1)\
**Post date:** [December 20, 2021, 5:48pm UTC](https://forum.inductiveautomation.com/t/bug-5344-onclick-event-doesnt-work-on-perspective-tree-component/54297/4 "2021-12-20T17:48:51Z")

</div>

**onClick** only works if you hit a location in the component that is not an item. 😓

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [December 20, 2021, 6:05pm UTC](https://forum.inductiveautomation.com/t/bug-5344-onclick-event-doesnt-work-on-perspective-tree-component/54297/5 "2021-12-20T18:05:49Z")

</div>

Oh, I see - and so the expectation is that the onClick Event fires even when clicking an item? Let me speak with Dev and we’ll see about working this out.

UPDATE: We’ve identified the cause, and it’s definitely not the intent to prevent the onClick Event from firing if an item is clicked. We’ve opened an internal ticket to address this.

---

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [December 20, 2021, 7:52pm UTC](https://forum.inductiveautomation.com/t/bug-5344-onclick-event-doesnt-work-on-perspective-tree-component/54297/6 "2021-12-20T19:52:40Z")

</div>

Will it be include in 8.1.13 final?

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [December 20, 2021, 9:56pm UTC](https://forum.inductiveautomation.com/t/bug-5344-onclick-event-doesnt-work-on-perspective-tree-component/54297/7 "2021-12-20T21:56:55Z")

</div>

No; I would not expect it anytime soon.
