Hi, first of all, thank you for this awesome library, it really rocks!
v6.7.6
If I select a pivot and data is changed, pivot selection is not remembered and it's lost. This is very frustrating from a user point of view and one can't really use pivot functionality in case data may be changed.
https://codesandbox.io/s/jzkwrr91rv
Wouldn't it be possible if react-table somehow keeps pivot-related state persisted or tries to recover somehow in case 'pivotBy' categories stay the same?
Not at present. The Pivot information is tied to the sorting. So if data changes that will trigger an internal change to the data.
You could look at the following props (from the doco) and see if any of those help. But then you will be faced with a "dirty" page that won't represent the reality to the user....
collapseOnSortingChange: true,
collapseOnPageChange: true,
collapseOnDataChange: true,
freezeWhenExpanded: false,
@gary-menzel thanks for your reply. What seems to be a big inconsistent here is that sorting is actually preserved, but pivot information/status is not.
Did you try any of those settings above? They control the expanding/collapsing of the additional rows for either Pivot or SubComponent. NOTE: Pivot and SubComponent use the same mechanism.
Setting collapseOnDataChange to false helped, thanks a lot. However I still think it could be a default.
Most helpful comment
Not at present. The Pivot information is tied to the sorting. So if data changes that will trigger an internal change to the data.
You could look at the following props (from the doco) and see if any of those help. But then you will be faced with a "dirty" page that won't represent the reality to the user....