Skip to content

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

Closed
@DerKleineGauss

Description

@DerKleineGauss

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] '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] '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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy