I have a table with an action button that opens a modal so the user can dive deeper into a selected row. Lets say we have rows 1,2,3,4. Currently if the user is inside row 1 and wants to go to row 2, they have to exit the modal and then select row 2. I would like to put a "Next" button in the modal that just changes out the modal's data to row2.
I can do this if the user doesn't sort the original table by just adding 1 to the table.displayedData.index. BUT the displayedData doesn't sort when the user sorts a column in the table. So if the user sorted the table to be rows 4,3,2,1 the displayedData still shows rows 1,2,3,4
Is there a simple way to get what index the next visible row in the table is?