preserve selection during filter changes

Summary:
During filter changes, DataTable would loose any selections made, which was posted multiple times as papercut

I didn't implement preserving multi line selections. That should be straightforward, but wasn't sure that'd be desirable or not.

Changelog: DataTable: Data tables will now preserve the current selection and scroll it into view when changing the search filter.

Reviewed By: aigoncharov

Differential Revision: D36736496

fbshipit-source-id: 401ef351c847f58a5d411cf9f352390f6a110b24
This commit is contained in:
Michel Weststrate
2022-06-07 04:04:01 -07:00
committed by Facebook GitHub Bot
parent fd3f6a0435
commit 2037cf0595
3 changed files with 57 additions and 22 deletions

View File

@@ -110,7 +110,7 @@ type DataManagerConfig<T> = {
enablePersistSettings?: boolean;
};
type DataManagerState<T> = {
export type DataManagerState<T> = {
config: DataManagerConfig<T>;
usesWrapping: boolean;
storageKey: string;