mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-09-04 09:32:33 +00:00
file collapsible closed by default
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
|
||||
export let id: string;
|
||||
|
||||
let defaultState = getContext<'open' | 'closed'>('collapsible-tree-default-state');
|
||||
let open = getContext<Writable<Record<string, boolean>>>('collapsible-tree-state');
|
||||
let side = getContext<'left' | 'right'>('collapsible-tree-side');
|
||||
let margin = getContext<number>('collapsible-tree-margin');
|
||||
@@ -14,7 +15,7 @@
|
||||
|
||||
open.update((value) => {
|
||||
if (!value.hasOwnProperty(id)) {
|
||||
value[id] = true;
|
||||
value[id] = defaultState === 'open';
|
||||
}
|
||||
return value;
|
||||
});
|
||||
|
Reference in New Issue
Block a user