Skip to content

Multi select mistakenly clears selection when no tag is added #3134

@ericjeney

Description

@ericjeney

Environment

  • Blueprint 3.8.0
  • MacOS. Chrome 69

Steps to reproduce

  1. Open MultiSelect docs
  2. Enter gibberish so that nothing matches

image

  1. Press enter

Actual behavior

Gibberish is no longer shown but the gibberish filter still applies.

image

Expected behavior

Nothing happens when pressing enter, and the gibberish is still shown.

image

Possible solution

A few, though I'm not sure which is most in line with the rest of the Blueprint API:

  1. Don't automatically clear the inputValue in TagInput.addTags if inputValue is controlled
  2. Add a prop to TagInput that controls whether the value is auto cleared
  3. In MultiSelect, pass an onAdd function to the TagInput component that always returns false, because we don't want it to auto clear the input.

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