V7
When using expanded rows and sorting together the state of the expanded row isn't tied to the exact row just the index.
An example and steps to replicate shown below:
Grouping by age and expanding the age equal to 0 as shown below
Age | Name
v 0 |
鈹溾攢 0 | Peter
鈹斺攢 0 | John
> 1 |
Then sorting by name causes the rows to reorder as expected however now the age group equal to 1 is expanded whereas the age group 0 is expected to be expanded.
Actual:
Age | Name
v 1 |
鈹溾攢 1 | Alex
鈹斺攢 1 | Bob
> 0 |
Expected:
Age | Name
> 1 |
v 0 |
鈹溾攢 0 | Peter
鈹斺攢 0 | John
This can be tested in the sandbox demo here by following the steps mentioned above.
I'll take a look into this.
Indeed, useExpanded is using the materialized row index, and not the original index to track expanded state. This should be fixed in the next alpha release 馃憤.
This is fixed in the latest alpha release.
Most helpful comment
Indeed,
useExpandedis using the materialized row index, and not the original index to track expanded state. This should be fixed in the next alpha release 馃憤.