question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

routing within dropdown: <router-link>'s tag & event prop is deprecated

See original GitHub issue

Describe 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

  1. Implement vue-router to vue-bootstrap project as described here : https://router.vuejs.org/installation.html#npm
  2. 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>
  3. 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

https://codesandbox.io/s/vibrant-visvesvaraya-mt574

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:5
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

15reactions
archieDevelopercommented, Jun 8, 2021

@jackmu95 When is the patch release?

4reactions
jacobmllr95commented, Jan 28, 2021

I’ve created a CodeSandbox that reproduces the issue: https://codesandbox.io/s/vibrant-visvesvaraya-mt574

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found