Browse Source

fix(nc-gui): merge sidebar storage defaults

pull/3801/head
braks 2 years ago
parent
commit
0546e42d35
  1. 1
      packages/nc-gui/components/smartsheet/sidebar/index.vue
  2. 2
      packages/nc-gui/composables/useSidebar/index.ts

1
packages/nc-gui/components/smartsheet/sidebar/index.vue

@ -108,7 +108,6 @@ function onCreate(view: ViewType) {
class="relative shadow-md h-full"
theme="light"
>
{{ isOpen }}
<LazySmartsheetSidebarToolbar
v-if="isOpen"
class="min-h-[var(--toolbar-height)] max-h-[var(--toolbar-height)] flex items-center py-3 px-3 justify-between border-b-1"

2
packages/nc-gui/composables/useSidebar/index.ts

@ -27,7 +27,7 @@ const createSidebar = (id: string, props: UseSidebarProps = {}) => {
}
if (props.useStorage) {
const storage = toRefs(useStorage(id, { isOpen, hasSidebar }, localStorage).value)
const storage = toRefs(useStorage(id, { isOpen, hasSidebar }, localStorage, { mergeDefaults: true }).value)
isOpen.value = storage.isOpen.value
hasSidebar.value = storage.hasSidebar.value

Loading…
Cancel
Save