diff --git a/packages/web/src/datagrid/DataGrid.svelte b/packages/web/src/datagrid/DataGrid.svelte index aca02caff..d5348a6a4 100644 --- a/packages/web/src/datagrid/DataGrid.svelte +++ b/packages/web/src/datagrid/DataGrid.svelte @@ -67,7 +67,7 @@ import registerCommand from '../commands/registerCommand'; import { registerMenu } from '../utility/contextMenu'; import { getBoolSettingsValue } from '../settings/settingsTools'; - import { getLocalStorage } from '../utility/storageCache'; + import { getLocalStorage, getLocalStorage, getLocalStorage, setLocalStorage } from '../utility/storageCache'; export let config; export let setConfig; @@ -144,9 +144,23 @@ { command: 'dataGrid.switchToJson', tag: 'switch', hideDisabled: true }, { command: 'dataGrid.toggleLeftPanel', tag: 'switch' } ); + + $: if (managerSize) setLocalStorage('dataGridManagerWidth', managerSize); + + function getInitialManagerSize() { + const width = getLocalStorage('dataGridManagerWidth'); + if (_.isNumber(width) && width > 30 && width < 500) { + return `${width}px`; + } + return '300px'; + } - +