Skip to content

DropdownItem does not accept href prop #367

@marcdel

Description

@marcdel

What is the correct way to create a link in a NavDropdown?

  • version 4.3.0
  • components: NavDropdown, DropdownItem

Is there a better way to create dropdown menu items in a navigation than doing onClick={() => window.location.href = "/somewhere"}?

It seems like in the context of a nav you would want the items to render as an <a></a> rather than a <button></button>. Maybe a NavDropdownItem?

Steps to reproduce issue

https://codepen.io/marcdel/pen/aJYwQR

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions