Row action button latency issue with fetching selected row data

Hi there.

Use Case: When a user clicks a row actions, open a model with row details, & fetch additional data based on selected row.

Issue: When using Row Action buttons on a table, the tableName.selectedRow object does not update immediately when clicked. The selectedRow object is updating significantly after the button is clicked.

The result of this causes triggered queries to run with previously selected row data. Adding debounce to the query trigger / row action button can help, but result is varied from user to user.

We have tried using different combinations of "Watched Inputs" on the query to watch modal.Hidden or tableName.selectedRow.myProp.

Lastly, we don't want the query to run every time a row selection occurs, only when the model is open to prevent unnecessary query calls. To solve for this we have also tried using query disable set to modal.Hidden but to varied luck.

1 Like

Hey there @Douglas_Urriola,

You could use a script as event handler and sequence your queries, e.g

Modal1.isHidden(false);

await query1.trigger()

This would first open your modal and then run the query.

I've never had the latency issue you mentioned, so I have assumed clicking on a row event always automatically select the row first, and then triggers the event, but I may be wrong here.

Hi Miguel,

I'll give this a try and will confirm back. But either way thanks for you help.