Change Cell event handler persists stale row data in Firefox

I ran into a bug when using the Change Cell event handler directly on an editable table column (instead of the table's Save Actions handler). When the event handler triggers a query that reads table.selectedSourceRow, Firefox consistently captures the previously selected row rather than the row that was just edited.

How to reproduce

I put together a minimal demo app to isolate the issue. Here's the setup:

  1. A table has one or more editable columns with a Change Cell event handler (not Save Actions).

  2. The event handler fires a query that reads table.selectedSourceRow and persists it to a state variable.

Steps to trigger the bug:

  1. Select a row, then edit a cell in a different row.

  2. In Chrome/Safari: state is correctly updated with the edited row.

  3. In Firefox: state is updated with the previously selected row.

Workaround & why it's not good enough

Adding a 500ms debounce to the query does fix the issue, but I don't want to rely on this. A user on a slower machine might still hit the same problem, so it feels like patching over a timing issue rather than actually solving it.

Here is an JSON export of my app

Firefox bug.json (23.5 KB)

Has anyone else run into this or found a more reliable fix?

3 Likes

Thanks for the detailed report! I am able to reproduce this with the app you shared. I'll make sure our team is aware, so we can work on a fix.

We'll reach out here when we have an update

Hi @Simon_Damiaens,

If you use currentRow instead of selectedRow, does it work better? I'm wondering if that could be a workaround :crossed_fingers: