React-select How to clear options once user selected
问题 I'm using react-select to present the user with a dropdown list of options. I would like it if a specific option is chosen, all other options will disappear. For example, if the "ALL" option is selected, I would like all other options to disappear: As far as I saw, react-select maintains the state of the non-selected options. Can this be controlled via some prop passed to the react-select component? 回答1: You can write related processes in handler , if all is selected, change the option data