Skip to content

Usage with Custom components as MenuItem #160

@gaurav5430

Description

@gaurav5430

In the current implementation, the focus management and onClick for the MenuItem is internally taken care of . This works alright when the MenuItems are spans which need to trigger a functionality on click, but if the MenuItems are to be links (anchor tag), then this does not work as expected.

In the docs, i can see that we can pass a tag and props to the MenuItem instead of children which will make it work for the link as expected.

<MenuItem tag='a' href="https://..." > text </MenuItem>

Is there a way to make this work with Link from react router, or any other custom Link components

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions