[IGN-5913]Perspective Table Selection Bug

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.

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

Nothing specific, just happened to notice it.

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:

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 selectedRows prop.

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.

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.