Skip to content

Expose alternative InputBlur-like event for use with useMultipleSelection #1159

@bnjmnt4n

Description

@bnjmnt4n
  • downshift version: v6

Feature request:

downshift attaches event listeners to the document to trigger the InputBlur event when the the user clicks outside of the downshift menu element when the menu is open. I'd like to request a similar event to be triggered for use with useMultipleSelection.

Here's my usecase: I have a multiple selection with different styles for the currently active selected item. I'd like to be able to reset this when the user clicks outside the menu, so anytime the user clicks outside of the menu elements I'd call something like setActiveIndex(-1). The InputBlur event does not trigger in this case as the menu is not open, so I'm unable to call setActiveIndex(-1) during InputBlur. I feel that this is a common enough use case that this could be integrated within useMultipleSelection.

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