Restore scroll on infinite lists

This commit is contained in:
jeffvli 2022-12-31 04:02:47 -08:00
parent ec79d91d30
commit 1fee4c1946
3 changed files with 6 additions and 4 deletions

View file

@ -102,8 +102,9 @@ export const PlaylistListContent = ({ tableRef }: PlaylistListContentProps) => {
rowCount: undefined,
};
params.api.setDatasource(dataSource);
params.api.ensureIndexVisible(page.table.scrollOffset, 'top');
},
[page.filter, queryClient, server],
[page.filter, page.table.scrollOffset, queryClient, server],
);
const onPaginationChanged = useCallback(