collapsed left column - moved from settings to storage

This commit is contained in:
Jan Prochazka
2021-12-30 17:36:46 +01:00
parent 064a5f5564
commit 0b81ea8f4e
7 changed files with 17 additions and 9 deletions

View File

@@ -47,6 +47,7 @@
import { registerMenu } from '../utility/contextMenu';
import createActivator, { getActiveComponent } from '../utility/createActivator';
import createUndoReducer from '../utility/createUndoReducer';
import { getLocalStorage, setLocalStorage } from '../utility/storageCache';
import useGridConfig from '../utility/useGridConfig';
export let tabid;
@@ -99,8 +100,9 @@
dispatchModel({ type: 'set', value: newModel });
}
const collapsedLeftColumnStore = writable(false);
const collapsedLeftColumnStore = writable(getLocalStorage('freeTable_collapsedLeftColumn', false));
setContext('collapsedLeftColumnStore', collapsedLeftColumnStore);
$: setLocalStorage('freeTable_collapsedLeftColumn', $collapsedLeftColumnStore);
export function toggleDynamicStructure() {
let structure = $modelState.value.structure;