Blueprint: Reset Select component

Created on 7 Sep 2020  路  2Comments  路  Source: palantir/blueprint

Environment

  • __Package version(s)__: "@blueprintjs/select": "^3.13.7"
  • __Browser and OS versions__: n/a

Question

I have two select components. If a user chooses an option from select component A, I'd like to reset select component B.

How can I reset a component back to an un-selected state.

image

select question

Most helpful comment

Ok, so I figured out that I can reset the text on the Button. I have also kept a reference to the activeItem in a context that's shared between both selectors. Selecting an item in select component A now removes the activeItem from select component B and the button text is also reset.

All 2 comments

Ok, so I figured out that I can reset the text on the Button. I have also kept a reference to the activeItem in a context that's shared between both selectors. Selecting an item in select component A now removes the activeItem from select component B and the button text is also reset.

Closing as this seems to be a generic question about React application logic and not really Blueprint-specific.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

NickyYo picture NickyYo  路  18Comments

vladeck picture vladeck  路  32Comments

Binck360 picture Binck360  路  25Comments

mulholio picture mulholio  路  20Comments

ConneXNL picture ConneXNL  路  24Comments