Skip to content

More control over keyboard menu item selection #1601

@truk

Description

@truk

I was wondering if you would consider allowing more control over the keyboard interaction for selecting MenuItems. In our use case, we are building a filtering string as users type, but due to the way the MenuItem captures keydown events, if users type a space, it invokes the MenuItem selection.

https://github.com/szhsin/react-menu/blob/master/src/components/MenuItem.js#L69

We definitely want the Enter key to do this, but not the space key.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions