fix data tables not remembering their defaults
Summary: Changelog: Data tables will now remember their configuration by default and share it across different applications As reported, column configurations were often not remembered across restarts. This was caused by two things 1. persisting config was by default turned off 2. the persistence key was based on pluginKey, that includes device and client identification, rather than purely the plugin name. Reviewed By: cekkaewnumchai Differential Revision: D33364780 fbshipit-source-id: 6c38182dc35e3cce23b858f931d554111b080c97
This commit is contained in:
committed by
Facebook GitHub Bot
parent
b77b234e98
commit
25e585b819
@@ -330,6 +330,7 @@ export function createDataTableManager<T>(
|
||||
export function createInitialState<T>(
|
||||
config: DataManagerConfig<T>,
|
||||
): DataManagerState<T> {
|
||||
// by default a table is considered to be identical if plugins, and default column names are the same
|
||||
const storageKey = `${config.scope}:DataTable:${config.defaultColumns
|
||||
.map((c) => c.key)
|
||||
.join(',')}`;
|
||||
|
||||
Reference in New Issue
Block a user