Get the index of a row as "natural" order (order displayed on the table)
I'm trying to implement "row navigation" with the keyboard, so whenever you press the ArrowUp or ArrowDown the row right above/below the currently selected row is selected instead. However I'm not sure how I can get the index for the "natural" order, ie the order the rows show up in the table, as that depends on its state.
As an example: if rows are sorted but not grouped,
table.getSortedRowModel()
works well, but not if they are grouped. If they are grouped and not sorted table.getExpandedRowModel()
works well, but then if they are both sorted and grouped/expanded, this also doesn't work. Is there any model I could use that gives me rows
in the actual order they are displayed on table?1 Reply
unwilling-turquoise•3y ago
did you find a way?
I am trying to get the display index of a sorted table