Skip to content

"tag" propery of b-button is not working if we use "to" property #5529

@pathikmehta

Description

@pathikmehta

Issue

When I am using to property with b-button it does not apply tag property.
In my case, I am using to property as I wanted to redirect and tag property to use the button HTML element instead it is creating a element.
With a element certain CSS properties do not work as it works with the button element which is creating inconsistency in my application in look and feel.

Steps to Reproduce

  1. Use b-button anywhere in your application
  2. Add to property to it to redirect to some other page
  3. Check in your developer tools, that button will be created using a HTML element.
  4. Now add one property tag in your b-button and use value as button. According to doc, it should use the button HTML element to create that button instead of a element because I have explicitly defined the HTML tag to be used.
  5. Again check in your developer tools, still, that button will be created using a HTML element even though tag is defined as button in properties.

Expected behavior

When we explicitly use tag property to use certain HTML tag it should use that instead of overriding that with a when using to property to support routing.
High level in I think, if we use tag property explicitly then any other property or values should not impact that and in the end, it should override the values and consider the explicitly provided value.

Versions

  • BootstrapVue: ^2.1.0
  • Bootstrap: ^4.1.3
  • Vue: ^2.6.8

Environment:

  • Device: Laptop
  • OS: Windows
  • Browser: Chrome

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