palantir / blueprint

A React-based UI toolkit for the web
https://blueprintjs.com/
Apache License 2.0
20.74k stars 2.18k forks source link

Multiselect reset query on focusOut #3686

Closed Rashe closed 1 year ago

Rashe commented 5 years ago

Question

For now the query stays as is if I don't select any value from results. Any way to reset the query string on focus out?

Thx

adidahiya commented 5 years ago

I think you might be able to do this yourself by reacting to input blur:

<MultiSelect
  query={...}
  tagInputProps={{
    inputProps: {
      onBlur: () => { ... }
    }
  }}
/>
Rashe commented 5 years ago

@adidahiya yea, I made something similar, but there will be an issue with selecting item in results list with mouse.

adidahiya commented 5 years ago

@Rashe what issue exactly? Can you reproduce it using a code sandbox?