Skip to content

Commit 591905c

Browse files
fix: sync right sidebar open state
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent a015570 commit 591905c

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

src/components/RightSidebar/RightSidebar.vue

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<template>
66
<NcAppSidebar v-if="sidebarStore.activeTab.length > 0"
77
ref="rightAppSidebar"
8-
:open="sidebarStore.isVisible"
8+
v-model:open="opened"
99
:name="fileName"
1010
:subtitle="subTitle"
1111
v-model:active="sidebarStore.activeTab"
@@ -58,7 +58,16 @@ const route = useRoute()
5858
const rightAppSidebar = ref<SidebarRef | null>(null)
5959
6060
const fileName = computed(() => filesStore.getSelectedFileView()?.name ?? '')
61-
const opened = computed(() => sidebarStore.isVisible)
61+
const opened = computed({
62+
get: () => sidebarStore.isVisible,
63+
set: (isOpen: boolean) => {
64+
if (isOpen) {
65+
sidebarStore.showSidebar()
66+
} else {
67+
sidebarStore.hideSidebar()
68+
}
69+
},
70+
})
6271
const subTitle = computed(() => {
6372
if (!opened.value) {
6473
return t('libresign', 'Enter who will receive the request')

0 commit comments

Comments
 (0)