# Selected data in table updates to empty array upon first update

**URL:** <https://forum.inductiveautomation.com/t/selected-data-in-table-updates-to-empty-array-upon-first-update/111436>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [October 14, 2025, 1:34pm UTC](https://forum.inductiveautomation.com/t/selected-data-in-table-updates-to-empty-array-upon-first-update/111436 "2025-10-14T13:34:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Noah\_Gilgo](https://avatars.discourse-cdn.com/v4/letter/n/c89c15/32.png) [@Noah\_Gilgo](https://forum.inductiveautomation.com/u/Noah_Gilgo)\
**Post date:** [October 14, 2025, 1:34pm UTC](https://forum.inductiveautomation.com/t/selected-data-in-table-updates-to-empty-array-upon-first-update/111436/1 "2025-10-14T13:34:23Z")

</div>

I’m currently trying to implement a button in a popup that, when pressed, selects every row in the table beneath it.

The button uses the onClick event below:

```python
self.parent.parent.getChild("Table").props.selection.data = self.parent.parent.getChild("Table").props.data

```

This button works properly in every case _except_ for the first time that the button is clicked after the popup is loaded. When the button is first clicked, it _very briefly_ sets `self.parent.parent.getChild("Table").props.selection.data = self.parent.parent.getChild("Table").props.data`, before immediately setting `self.parent.parent.getChild("Table").props.selection.data = []`. All subsequent clicks of the button result in every row being selected as expected.

Is there a way to circumvent this behavior?
