Skip to content

Commit 5b5bb4e

Browse files
committed
fix(CSidebarNav): The first group doesn't open on first click.
1 parent d734a73 commit 5b5bb4e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/components/sidebar/CSidebarNav.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ const CSidebarNav = defineComponent({
2828
// @ts-expect-error name is defined in component
2929
if (vnode.type.name === 'CNavGroup') {
3030
return h(vnode, {
31-
onVisibleChange: (visible: boolean) => handleVisibleChange(visible, index),
32-
...(visibleGroup.value && { visible: isVisible(index) }),
31+
onVisibleChange: (visible: boolean) => handleVisibleChange(visible, index + 1),
32+
...(visibleGroup.value && { visible: isVisible(index + 1) }),
3333
})
3434
}
3535
return vnode

0 commit comments

Comments
 (0)