# \[IGN-5913\]Perspective Table Selection Bug

**URL:** <https://forum.inductiveautomation.com/t/ign-5913-perspective-table-selection-bug/58384>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [April 12, 2022, 9:21pm UTC](https://forum.inductiveautomation.com/t/ign-5913-perspective-table-selection-bug/58384 "2022-04-12T21:21:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nikolai\_Wolterstorff](https://avatars.discourse-cdn.com/v4/letter/n/35a633/32.png) [@Nikolai\_Wolterstorff](https://forum.inductiveautomation.com/u/Nikolai_Wolterstorff)\
**Post date:** [April 12, 2022, 9:21pm UTC](https://forum.inductiveautomation.com/t/ign-5913-perspective-table-selection-bug/58384/1 "2022-04-12T21:21:18Z")

</div>

Ignition version: 8.1.15 (b2022030114)

With a perspective table, when items in props.data have objects, they do not show up in the props.selection.data.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/7/f73cb206748b448542dec2e6128c959d2cb0dc0b.png)

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [April 12, 2022, 10:23pm UTC](https://forum.inductiveautomation.com/t/ign-5913-perspective-table-selection-bug/58384/2 "2022-04-12T22:23:25Z")

</div>

I have confirmed this.  
What are you trying to achieve by having objects in the cell?

---

<div class="post-metadata">

**Author:** ![Nikolai\_Wolterstorff](https://avatars.discourse-cdn.com/v4/letter/n/35a633/32.png) [@Nikolai\_Wolterstorff](https://forum.inductiveautomation.com/u/Nikolai_Wolterstorff)\
**Post date:** [April 13, 2022, 5:06pm UTC](https://forum.inductiveautomation.com/t/ign-5913-perspective-table-selection-bug/58384/3 "2022-04-13T17:06:01Z")

</div>

Nothing specific, just happened to notice it.

---

<div class="post-metadata">

**Author:** ![swolnisty](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@swolnisty](https://forum.inductiveautomation.com/u/swolnisty)\
**Post date:** [April 13, 2022, 7:09pm UTC](https://forum.inductiveautomation.com/t/ign-5913-perspective-table-selection-bug/58384/4 "2022-04-13T19:09:04Z")

</div>

I actually think this would be the expected behavior. This component seems to be designed to look for a specific object structure when you are not providing a direct link to data. If you want each cell to be its own object, the table will automatically recognize certain keys (e.g. value, style, etc). Adding a “value” key to your cell and you should see that value displayed under the selected data:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/a/ba0f9ab9845c15cdaf2a4401231147eb0f1c9de6.png)

If you really need to reference the entire object of any selected cell, you would probably be better off doing an expression based off the selectedRow and selectedColumn properties.

---

<div class="post-metadata">

**Author:** ![Nikolai\_Wolterstorff](https://avatars.discourse-cdn.com/v4/letter/n/35a633/32.png) [@Nikolai\_Wolterstorff](https://forum.inductiveautomation.com/u/Nikolai_Wolterstorff)\
**Post date:** [April 13, 2022, 8:46pm UTC](https://forum.inductiveautomation.com/t/ign-5913-perspective-table-selection-bug/58384/5 "2022-04-13T20:46:55Z")

</div>

> [@swolnisty](#):
>
> If you really need to reference the entire object of any selected cell, you would probably be better off doing an expression based off the selectedRow and selectedColumn properties.

Works with single selection, but unfortunately not when using multiple, as there is no selectedRow **s** prop.

---

<div class="post-metadata">

**Author:** ![swolnisty](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@swolnisty](https://forum.inductiveautomation.com/u/swolnisty)\
**Post date:** [April 14, 2022, 4:20pm UTC](https://forum.inductiveautomation.com/t/ign-5913-perspective-table-selection-bug/58384/6 "2022-04-14T16:20:55Z")

</div>

In that case, you could use the onSelectionChange event script’s event data to get the data you need, either referencing the event.data itself or using the event.selectedRow/event.selectedColumn properties to append cell/row info to a custom property as multiple selections occur.

---

<div class="post-metadata">

**Author:** ![Nikolai\_Wolterstorff](https://avatars.discourse-cdn.com/v4/letter/n/35a633/32.png) [@Nikolai\_Wolterstorff](https://forum.inductiveautomation.com/u/Nikolai_Wolterstorff)\
**Post date:** [April 14, 2022, 8:34pm UTC](https://forum.inductiveautomation.com/t/ign-5913-perspective-table-selection-bug/58384/7 "2022-04-14T20:34:39Z")

</div>

Works until:  
A) User shift clicks and selects a range. onSelectionChange only fires per click, so you’d have to combine it with onClick and event.shiftKey some way to get the range. And the cells with an object within do not show up in event.data.  
~~B) Table is filtered via props.filter, and then props.selection.selectedRow does not match up with the position within props.data.~~ selectedRow does correlate with props.data, but wouldn’t work with the method A above (don’t know what rows are filtered/not filtered).

I also confirmed that if the data is in [{‘style’: …, ‘value’: …}] format, those object values do not show up in the selection.
