# Timing problem on table selection

**URL:** <https://forum.inductiveautomation.com/t/timing-problem-on-table-selection/53015>\
**Category:** Ignition\
**Created:** [November 12, 2021, 11:50am UTC](https://forum.inductiveautomation.com/t/timing-problem-on-table-selection/53015 "2021-11-12T11:50:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anastasia.blinova](https://avatars.discourse-cdn.com/v4/letter/a/a698b9/32.png) [@anastasia.blinova](https://forum.inductiveautomation.com/u/anastasia.blinova)\
**Post date:** [November 12, 2021, 11:50am UTC](https://forum.inductiveautomation.com/t/timing-problem-on-table-selection/53015/1 "2021-11-12T11:50:26Z")

</div>

I have a table with an additional column containing a button.  
The button has a parameter which binds to a column in props.selection.data.

This usually works. But if a user selects row A, and then clicks on the button on row B, the selection data gets passed to the button before the selection data has changed.  
ie, button gets row A data

Does anyone know if there is a wait command I could use to ensure selection data has changed? Or any other workaround for this problem.

---

<div class="post-metadata">

**Author:** ![YF129701](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/yf129701/32/60498_2.png) [@YF129701](https://forum.inductiveautomation.com/u/YF129701)\
**Post date:** [November 12, 2021, 3:54pm UTC](https://forum.inductiveautomation.com/t/timing-problem-on-table-selection/53015/2 "2021-11-12T15:54:44Z")

</div>

Does it behave correctly when you wait for a certain period of time? My intuition (which may be flawed) is telling me it isn’t a timing issue

---

<div class="post-metadata">

**Author:** ![anastasia.blinova](https://avatars.discourse-cdn.com/v4/letter/a/a698b9/32.png) [@anastasia.blinova](https://forum.inductiveautomation.com/u/anastasia.blinova)\
**Post date:** [November 12, 2021, 3:57pm UTC](https://forum.inductiveautomation.com/t/timing-problem-on-table-selection/53015/3 "2021-11-12T15:57:07Z")

</div>

I haven’t managed to find expression to put in binding to make it wait.

It works perfectly if user first clicks on row and then the button on same row.

---

<div class="post-metadata">

**Author:** ![YF129701](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/yf129701/32/60498_2.png) [@YF129701](https://forum.inductiveautomation.com/u/YF129701)\
**Post date:** [November 12, 2021, 4:01pm UTC](https://forum.inductiveautomation.com/t/timing-problem-on-table-selection/53015/4 "2021-11-12T16:01:32Z")

</div>

Just to confirm, you have the `enableRowSelection` set to True and `enableColumnSelection` set to False? When you click the button in row B, does it select the entire row, but your selection data object just doesn’t change?

---

<div class="post-metadata">

**Author:** ![anastasia.blinova](https://avatars.discourse-cdn.com/v4/letter/a/a698b9/32.png) [@anastasia.blinova](https://forum.inductiveautomation.com/u/anastasia.blinova)\
**Post date:** [November 12, 2021, 4:03pm UTC](https://forum.inductiveautomation.com/t/timing-problem-on-table-selection/53015/5 "2021-11-12T16:03:36Z")

</div>

When row is clicked, the selection data does change. Just not as fast as the button event.  
So button still uses old selection data.

And yes, `enableRowSelection` is set to True and `enableColumnSelection` is set to False.
