I have a table that receives its data from a transformer. This transformer is triggered every time I call an API endpoint, and it aggregates the data into my table's format. Everything works; however, when I scroll down in my table, it resets my position every time the transformer's data is updated. Is there a way to prevent this from happening?
Hey @nikolajs,
The table is refreshing every time its data is regenerated, this is why the scroll bar resets upon your transformer being triggered.
You can limit the times the transformer is triggered, although this may be against what your trying to achieve.
Another thing you could try, is keeping a variable with the selectedRow id, and have the transformer success event set that row as selected upon refreshing. Not sure if that would make the table scroll down up to the selected row though...
Hello @nikolajs,
I second Miguel's comment. The table will refresh every time the data source is updated/regenerated.
A work around to the scrolling on refresh would be to add some logic to the transformer that is updating the data.
On our docs here we mention the scrollIntoView property that tables have.
You can have the success behavior scroll into view for a row that has been clicked by passing in selectedRow ID or use another method for keeping track of which row you want the table to scroll to on refresh