Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7a65f36

Browse filesBrowse files
committed
fix(CNavGroup): add the missing href attribute to the toggler
1 parent 8c28277 commit 7a65f36
Copy full SHA for 7a65f36

File tree

1 file changed

+7
-2
lines changed
Filter options

1 file changed

+7
-2
lines changed

‎packages/coreui-vue/src/components/nav/CNavGroup.ts

Copy file name to clipboardExpand all lines: packages/coreui-vue/src/components/nav/CNavGroup.ts
+7-2Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ const CNavGroup = defineComponent({
4141

4242
onMounted(() => {
4343
visible.value = props.visible
44-
props.visible && navGroupRef.value.classList.add('show')
44+
if (props.visible) {
45+
navGroupRef.value.classList.add('show')
46+
}
47+
4548
emit('visible-change', visible.value)
4649
})
4750

@@ -60,7 +63,8 @@ const CNavGroup = defineComponent({
6063
emit('visible-change', visible.value)
6164
})
6265

63-
const handleTogglerClick = () => {
66+
const handleTogglerClick = (event: Event) => {
67+
event.preventDefault()
6468
visible.value = !visible.value
6569
emit('visible-change', visible.value)
6670
}
@@ -111,6 +115,7 @@ const CNavGroup = defineComponent({
111115
'a',
112116
{
113117
class: ['nav-link', 'nav-group-toggle'],
118+
href: '#',
114119
onClick: handleTogglerClick,
115120
},
116121
slots.togglerContent && slots.togglerContent(),

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.