# \[FEATURE-13925\] Perspective Table On Click Event Doesn't Fire Script

**URL:** <https://forum.inductiveautomation.com/t/feature-13925-perspective-table-on-click-event-doesnt-fire-script/25153>\
**Category:** Ignition Early Access\
**Created:** [May 20, 2019, 2:32pm UTC](https://forum.inductiveautomation.com/t/feature-13925-perspective-table-on-click-event-doesnt-fire-script/25153 "2019-05-20T14:32:46Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![christopher.green](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@christopher.green](https://forum.inductiveautomation.com/u/christopher.green)\
**Post date:** [May 20, 2019, 2:32pm UTC](https://forum.inductiveautomation.com/t/feature-13925-perspective-table-on-click-event-doesnt-fire-script/25153/1 "2019-05-20T14:32:46Z")

</div>

I installed the latest Nightly Build this morning and lost all the on-click events on my perspective tables. I had to move them all to Mouse Up events.

---

<div class="post-metadata">

**Author:** ![christopher.green](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@christopher.green](https://forum.inductiveautomation.com/u/christopher.green)\
**Post date:** [May 29, 2019, 3:28pm UTC](https://forum.inductiveautomation.com/t/feature-13925-perspective-table-on-click-event-doesnt-fire-script/25153/2 "2019-05-29T15:28:08Z")

</div>

Has anyone else seen this?

---

<div class="post-metadata">

**Author:** ![ynejati](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ynejati/32/6093_2.png) [@ynejati](https://forum.inductiveautomation.com/u/ynejati)\
**Post date:** [May 29, 2019, 11:10pm UTC](https://forum.inductiveautomation.com/t/feature-13925-perspective-table-on-click-event-doesnt-fire-script/25153/3 "2019-05-29T23:10:51Z")

</div>

Hi,

Sorry for the inconvenience. Yes, you’re not the first one to see this. The reason for this is to prevent events from propagating upward when you have nested tables within subviews. What is that you’re trying to achieve? The better solution might be to provide more specific events resulting from interaction of internal features (see [[Feedback] NEW Perspective Table](http://forum.inductiveautomation.com/t/feedback-new-perspective-table/21199/46)).

Let me know if there’s a specific event you would like to see exposed in available component events.

-Yousuf

---

<div class="post-metadata">

**Author:** ![christopher.green](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@christopher.green](https://forum.inductiveautomation.com/u/christopher.green)\
**Post date:** [May 30, 2019, 1:36pm UTC](https://forum.inductiveautomation.com/t/feature-13925-perspective-table-on-click-event-doesnt-fire-script/25153/4 "2019-05-30T13:36:15Z")

</div>

I’m trying to pass the selection data to a popup for some indirect tag referencing. What would be the best event to drive this?

---

<div class="post-metadata">

**Author:** ![ynejati](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ynejati/32/6093_2.png) [@ynejati](https://forum.inductiveautomation.com/u/ynejati)\
**Post date:** [May 30, 2019, 3:18pm UTC](https://forum.inductiveautomation.com/t/feature-13925-perspective-table-on-click-event-doesnt-fire-script/25153/5 "2019-05-30T15:18:49Z")

</div>

How about `onSelectionChange`? Where the event contains the selection data. Which you can then use to trigger a popup?

---

<div class="post-metadata">

**Author:** ![christopher.green](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@christopher.green](https://forum.inductiveautomation.com/u/christopher.green)\
**Post date:** [June 11, 2019, 7:37pm UTC](https://forum.inductiveautomation.com/t/feature-13925-perspective-table-on-click-event-doesnt-fire-script/25153/6 "2019-06-11T19:37:41Z")

</div>

I don’t see onSelectionChange as an event for the table. Am I missing something? I see onSelect but I haven’t been able to get that to work.

---

<div class="post-metadata">

**Author:** ![ynejati](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ynejati/32/6093_2.png) [@ynejati](https://forum.inductiveautomation.com/u/ynejati)\
**Post date:** [June 11, 2019, 8:23pm UTC](https://forum.inductiveautomation.com/t/feature-13925-perspective-table-on-click-event-doesnt-fire-script/25153/7 "2019-06-11T20:23:05Z")

</div>

Hi,

No, you’re not missing anything. It hasn’t been added yet, but it’s on my list to do for this week.

-Yousuf

---

<div class="post-metadata">

**Author:** ![ynejati](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ynejati/32/6093_2.png) [@ynejati](https://forum.inductiveautomation.com/u/ynejati)\
**Post date:** [June 13, 2019, 5:45pm UTC](https://forum.inductiveautomation.com/t/feature-13925-perspective-table-on-click-event-doesnt-fire-script/25153/8 "2019-06-13T17:45:25Z")

</div>

Curious. Is your goal to show a popup when selection changes?

---

<div class="post-metadata">

**Author:** ![christopher.green](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@christopher.green](https://forum.inductiveautomation.com/u/christopher.green)\
**Post date:** [June 13, 2019, 5:59pm UTC](https://forum.inductiveautomation.com/t/feature-13925-perspective-table-on-click-event-doesnt-fire-script/25153/9 "2019-06-13T17:59:41Z")

</div>

Yeah. Have a popup show with some of the selection information passed in.

---

<div class="post-metadata">

**Author:** ![ynejati](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ynejati/32/6093_2.png) [@ynejati](https://forum.inductiveautomation.com/u/ynejati)\
**Post date:** [June 13, 2019, 7:24pm UTC](https://forum.inductiveautomation.com/t/feature-13925-perspective-table-on-click-event-doesnt-fire-script/25153/10 "2019-06-13T19:24:02Z")

</div>

Okay. I’m adding an onSelectionChange event that will provide an event object containing the selected row, column, and data. In the meantime, have you tried setting a property change script on the selected column and selected row properties?

---

<div class="post-metadata">

**Author:** ![christopher.green](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@christopher.green](https://forum.inductiveautomation.com/u/christopher.green)\
**Post date:** [June 13, 2019, 8:16pm UTC](https://forum.inductiveautomation.com/t/feature-13925-perspective-table-on-click-event-doesnt-fire-script/25153/11 "2019-06-13T20:16:12Z")

</div>

Yeah, as of right now I have a custom property bound to the selection, and when that changes it opens the popup and passes the selection through. I’m just hoping for an event 🙂

---

<div class="post-metadata">

**Author:** ![nburt](https://avatars.discourse-cdn.com/v4/letter/n/2bfe46/32.png) [@nburt](https://forum.inductiveautomation.com/u/nburt)\
**Post date:** [June 18, 2019, 6:03pm UTC](https://forum.inductiveautomation.com/t/feature-13925-perspective-table-on-click-event-doesnt-fire-script/25153/12 "2019-06-18T18:03:32Z")

</div>

@ynejati Hey I was wondering if you know the status of the proposed onRowDoubleClick event?

---

<div class="post-metadata">

**Author:** ![ynejati](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ynejati/32/6093_2.png) [@ynejati](https://forum.inductiveautomation.com/u/ynejati)\
**Post date:** [June 19, 2019, 5:43pm UTC](https://forum.inductiveautomation.com/t/feature-13925-perspective-table-on-click-event-doesnt-fire-script/25153/13 "2019-06-19T17:43:25Z")

</div>

Hi,

It is undergoing final review and hopefully will be available in tomorrow’s nightly. I will notify you when it is available. I will also post details on the new events in the [http://forum.inductiveautomation.com/t/feedback-new-perspective-table](http://forum.inductiveautomation.com/t/feedback-new-perspective-table) post.

-Yousuf

---

<div class="post-metadata">

**Author:** ![ynejati](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ynejati/32/6093_2.png) [@ynejati](https://forum.inductiveautomation.com/u/ynejati)\
**Post date:** [June 19, 2019, 7:57pm UTC](https://forum.inductiveautomation.com/t/feature-13925-perspective-table-on-click-event-doesnt-fire-script/25153/14 "2019-06-19T19:57:15Z")

</div>

Hi,

Just posted this in the feedback post, but I’ll post it here as well. Should be available in the next nightly build.

**onSelectionChange** : `{ selectedColumn: string | number | null, selectedRow: number | null, data: Array<PlainObject> }`  
**onCellEditStart** : `{ column: string | number, row: number, rowIndex: number, value: any }`  
**onCellEditCancel** : `{ column: string | number, row: number, rowIndex: number, value: any }`  
**onRowClick** : `{ row: number, rowIndex: number, value: PlainObject }`  
**onRowDoubleClick** : `{ row: number, rowIndex: number, value: PlainObject }`  
**onSubviewExpand** : `{ row: number, rowIndex: number, value: PlainObject }`  
**onSubviewCollapse** : `{ row: number, rowIndex: number, value: PlainObject }`

Some things to note:

- For onCellEditStart and onCellEditCancel, the value is the initial value, before any edits.
- onSelectionChange will fire on startup or mount if props do not equal the table components default selection config `{ selectedColumn: null, selectedRow: null, data: [] }` .

-Yousuf
