You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
routing within dropdown: <router-link>'s tag & event prop is deprecated #6373
Apparently the <b-dropdown-item> component creates router-link with properties tag and event by default. As a consequence Firefox console prints two warnings:
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>.
changed the title [-]navbar routing: <router-link>'s tag & event prop is deprecated[/-][+]routing within dropdown: <router-link>'s tag & event prop is deprecated[/+]on Jan 28, 2021
Thanks, we are experiencing this problem when upgrading vue-router from 3.4.9 to 3.5.1, these warnings show up in our jest run:
Details
FAIL spec/frontend/monitoring/router_spec.js
● Monitoring router › support legacy URLs with full dashboard path to visit dashboard page › "/dashboard.yml" renders page with dashboard "dashboard.yml"
Unexpected call of console.error() with:
[Vue warn]: Error in render: "Error: Unexpected call of console.warn() with:
[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."
found in
---> <RouterLink>
<BLink>
<BDropdownItem>
<GlDropdownItem>
<BDropdown>
<GlDropdown>
<ActionsMenu>
<DashboardHeader>
<Dashboard>
<Anonymous>
<Anonymous>
<Root>
at warn (node_modules/vue/dist/vue.runtime.common.dev.js:621:15)
at logError (node_modules/vue/dist/vue.runtime.common.dev.js:1880:5)
at globalHandleError (node_modules/vue/dist/vue.runtime.common.dev.js:1875:3)
at handleError (node_modules/vue/dist/vue.runtime.common.dev.js:1835:5)
at VueComponent.Vue._render (node_modules/vue/dist/vue.runtime.common.dev.js:3540:7)
at VueComponent.updateComponent (node_modules/vue/dist/vue.runtime.common.dev.js:4054:21)
at Watcher.get (node_modules/vue/dist/vue.runtime.common.dev.js:4465:25)
at new Watcher (node_modules/vue/dist/vue.runtime.common.dev.js:4454:12)
at mountComponent (node_modules/vue/dist/vue.runtime.common.dev.js:4061:3)
at VueComponent.Object.<anonymous>.Vue.$mount (node_modules/vue/dist/vue.runtime.common.dev.js:8392:10)
at init (node_modules/vue/dist/vue.runtime.common.dev.js:3112:13)
at createComponent (node_modules/vue/dist/vue.runtime.common.dev.js:5958:9)
at createElm (node_modules/vue/dist/vue.runtime.common.dev.js:5905:9)
at VueComponent.patch [as __patch__] (node_modules/vue/dist/vue.runtime.common.dev.js:6455:7)
at VueComponent.Vue._update (node_modules/vue/dist/vue.runtime.common.dev.js:3933:19)
at VueComponent.updateComponent (node_modules/vue/dist/vue.runtime.common.dev.js:4054:10)
Reacted by Luiz Gustavo Abou Hatem de Liz, Max Arndt, Jonathan Chang, Andre-John Mas, Supaporn Ploengpit, acanthis, Mohamed Tersawy, Flo, hadicodes, Eliophot and 5 more
Answer is a little bit late, but this problem still exists.
So, the best way I found to solve this is just replacing <b-dropdown-item> with <li> tag and put <nuxt-link class="dropdown-item"> inside it, as shown example below:
Activity
[-]navbar routing: <router-link>'s tag & event prop is deprecated[/-][+]routing within dropdown: <router-link>'s tag & event prop is deprecated[/+]miguelrincon commentedon Jan 28, 2021
Thanks, we are experiencing this problem when upgrading
vue-routerfrom 3.4.9 to 3.5.1, these warnings show up in our jest run:Details
See: https://gitlab.com/gitlab-org/gitlab/-/jobs/987471346#L1190
This is the related code in
b-linkthat usestag:bootstrap-vue/src/components/link/link.js
Line 108 in 5bf6733
EDIT: Cross-linking my comment at https://gitlab.com/gitlab-org/gitlab/-/merge_requests/52505#note_495967942
jacobmllr95 commentedon Jan 28, 2021
I've created a CodeSandbox that reproduces the issue:
https://codesandbox.io/s/vibrant-visvesvaraya-mt574
fix(b-link): remove default values from `vue-router` pass-down props (c…
archieDeveloper commentedon Jun 8, 2021
@jackmu95 When is the patch release?
Jorden- commentedon Nov 19, 2021
I still have the exact same warnings, yet if I read this correctly it should've already been patched?
Running:
Bootstrap: 4.6.1
Bootstrap-vue 2.21.2
vue-router: 3.5.3
vue 2.6.14
codetheorist commentedon Dec 2, 2021
There hasn't been a release since 2.21.2 was released on the 1 Jan 2021.
The project for 2.22.0 progress in the right sidebar shows how close a release of 2.22.0 we are, which isn't a million miles away.
2.22.0 is the release that will contain the fixes for this bug.
lipecss commentedon Dec 13, 2021
im still getting this same alert
raulfortes commentedon Mar 29, 2022
im still getting this same alert
mhuseynli commentedon Apr 13, 2022
Answer is a little bit late, but this problem still exists.
So, the best way I found to solve this is just replacing
<b-dropdown-item>with<li>tag and put<nuxt-link class="dropdown-item">inside it, as shown example below: