Whenever you change an item on the other pages, it re-renders the table.
Can anyone help me? I have a scenario where I'm using a data table, and the list of items comes from a state and one of the columns is a select with options.
The problem is that whenever I change the information in the select by changing the value of a row that is not on the first page, I need to update the item in the state and with that the table is rendered again and returns to the first page.
3 Replies
exotic-emerald•10mo ago
Sounds like a state value isn't added as a dependency.
Please share code.
typical-coral•10mo ago
I was facing this. I resolved it by setting these properties in the useTable config
fair-roseOP•10mo ago
Thank's @amgau
I ended up implementing a state to store the current page and pass it as a parameter to the data table, so even if the state updates I keep it on the same page.
I will test your solution tks