Data table scroll position not resetting after external search/sort
Posted: 12 Jul 2019, 19:56
We are running into an issue using the data table with external, server-side sorting / searching and lazy/virtual scrolling,
Currently, the table will maintain it's scroll position despite the array being passed to the value prop being replaced with a new set of records (with the records being retrieved, stored in redux and passed to the table.)
(This also creates a secondary problem where the table will call OnVirtualScroll with no user interaction if the user had been scrolled to the very bottom of the list when new records were received. But this should naturally be resolved if we can get the scroll position to reset.)
When a user sorts or performs a search, it's expected that the scroll position returns to the top of the table.
Is this current behavior expected? Are we missing something? is there a mechanism (aside from just replacing the array of records passed to the value prop which doesn't do it) to notify the table that we want the scroll position reset to 0?
Currently, the table will maintain it's scroll position despite the array being passed to the value prop being replaced with a new set of records (with the records being retrieved, stored in redux and passed to the table.)
(This also creates a secondary problem where the table will call OnVirtualScroll with no user interaction if the user had been scrolled to the very bottom of the list when new records were received. But this should naturally be resolved if we can get the scroll position to reset.)
When a user sorts or performs a search, it's expected that the scroll position returns to the top of the table.
Is this current behavior expected? Are we missing something? is there a mechanism (aside from just replacing the array of records passed to the value prop which doesn't do it) to notify the table that we want the scroll position reset to 0?