routing within dropdown: <router-link>'s tag & event prop is deprecated
See original GitHub issueDescribe the bug
Apparently the <b-dropdown-item>
component creates router-link with properties tag and event by default. As a consequence Firefox console prints two warnings:
_[vue-router] <router-link>'s tag prop is deprecated and has been removed in Vue Router 4. Use the v-slot API to remove this warning: https://next.router.vuejs.org/guide/migration/#removal-of-event-and-tag-props-in-router-link._
_[vue-router] <router-link>'s event prop is deprecated and has been removed in Vue Router 4. Use the v-slot API to remove this warning: https://next.router.vuejs.org/guide/migration/#removal-of-event-and-tag-props-in-router-link._
Steps to reproduce the bug
- Implement vue-router to vue-bootstrap project as described here : https://router.vuejs.org/installation.html#npm
- Within template of some component use
<b-dropdown>
or<b-nav-item-dropdown>
like so:<b-dropdown text="This dropdown"> <b-dropdown-item to="/home"> Home </b-dropdown-item> </b-dropdown>
- check in browser and get above mentioned warnings
Expected behavior
Dropdown components should use new v-slot API instead of tag and event when creating a <router-link>
.
Versions
Libraries:
- BootstrapVue: 2.21.2
- Bootstrap: 4.5.3
- Vue: 2.6.11
- Vue-Router: 3.5.1
Environment:
- OS: Windows 10
- Browser: Firefox
- Version: 84.0.2
Demo link
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:8 (2 by maintainers)
Top Results From Across the Web
VueJs [vue-router] <router-link>'s event prop is deprecated ...
I wish to remove this error that I have on the browser: [vue-router] <router-link>'s tag prop is deprecated and has been removed in...
Read more >Router support | Reference - BootstrapVue
Sometimes we want <router-link> to render as another tag, e.g <li> . Then we can use router-tag prop to specify which tag to...
Read more >vue/no-deprecated-router-link-tag-prop
Rule Details #. This rule reports deprecated the tag attribute on RouterLink elements (removed in Vue.js v3.0.0+).
Read more >Built-in Components - Nuxt
The <Nuxt> component can take the prop of nuxt-child-key . ... If you want to know more about <RouterLink> , feel free to...
Read more >Navbar | Components | BootstrapVue
Providing a to prop value will generate a <router-link> while providing an ... Note split dropdowns are not supported in <b-navbar> and <b-navbar-nav>...
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 FreeTop 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
Top GitHub Comments
@jackmu95 When is the patch release?
I’ve created a CodeSandbox that reproduces the issue: https://codesandbox.io/s/vibrant-visvesvaraya-mt574