Vue MenuItem router-link causes full reload
See original GitHub issue<MenuItem>
<router-link
:to="{ name: 'Logout' }"
class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 cursor-pointer focus:outline-none"
role="menuitem"
>
Sign out
</router-link>
</MenuItem>
any idea why this router link causes a full reload?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:6
Top Results From Across the Web
Vue.js 3, vue-router, @click event reloads whole page
Im new to Vue and i want while on mobile navigation when I click menuItem I run function toggleMenu(open/close Menu), but then whole...
Read more >MENU : Click on a link => How to reload only the content part ...
My links are defined in each "url" attribute of the menuItems. I juste want the "content" part to be reloaded, not the entire...
Read more >RouterLinkActive - Angular
Tracks whether the linked route of an element is currently active, and allows you to specify one or more CSS classes to add...
Read more >Layout Side Links - Quasar Framework
QSideLink is basically a wrapper over Vue's <router-link> component (read about it here), ... so it acts as a menu item on a...
Read more >How To Navigate Between Views with Vue Router
To complete this tutorial, you will need: Node.js version 10.6.0 or greater installed on your computer. To install this on macOS or Ubuntu...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hey! Thank you for your bug report! Much appreciated! 🙏
The router-link doesn’t forward everything correctly, flipping things around like this might help you: https://codesandbox.io/s/headlessuivue-menu-example-forked-31t3b?file=/src/components/Menu.vue
@RobinMalfait Thanks for fix. It would be good to have this in the docs or try and contact the vue team to “fix” router-link if it really isn’t working correctly as you say. Considering router-links are 1st class plugins for vue I’m guessing most of your vue user base will be running into this issue.
Do you take PRs for the documentation site? I’d be happy to help out as I’m really enjoying headlessui and tailwindui.