Skip to content

Commit

Permalink
Hide sidebar on nav menu click.
Browse files Browse the repository at this point in the history
  • Loading branch information
mross-ua committed Sep 24, 2023
1 parent 02c23c3 commit 28ce066
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const menuPassThroughOptions = {
<Menu :model="navMenuItems" :pt="menuPassThroughOptions">
<template #item="{ label, item, props }">
<RouterLink :to="item.to!" v-slot="{ href, route, navigate, isActive, isExactActive }" custom>
<a :href="href" v-bind="props.action" @click="navigate" :class="[isActive && 'router-link-active', isExactActive && 'router-link-exact-active']">
<a :href="href" v-bind="props.action" @click="navigate($event).then(() => isSidebarVisible = false)" :class="[isActive && 'router-link-active', isExactActive && 'router-link-exact-active']">
<span v-bind="props.icon" />
<span v-bind="props.label">{{ label }}</span>
</a>
Expand Down

0 comments on commit 28ce066

Please sign in to comment.