HubSpot / react-select-plus

Fork of https://github.com/JedWatson/react-select with option group support
http://github.hubspot.com/react-select-plus/
MIT License
286 stars 93 forks source link

Async multi-select sometimes hides the menu incorrectly after selecting a value #107

Closed not-an-aardvark closed 6 years ago

not-an-aardvark commented 6 years ago

I've noticed an issue when using Select.Async components with react-select-plus where the dropdown menu sometimes disappears. This issue does not occur with react-select.

To reproduce using the current react-select-plus demo:

  1. Scroll to the "Contributors (Async)" demo
  2. Click on the whitespace in the dropdown to expand it. Note that there are multiple values that can be selected.
  3. Click on the first value in the list ("Dave Brotherstone"), adding it to the selected options
  4. Click on the whitespace in the dropdown again

Expected behavior: The menu should reopen, displaying the other values that were previously in the list. (This is the behavior that happens in the react-select demo.)

Actual behavior: Attempting to open the dropdown again generates no visible response. From inspecting the component in devtools, it seems like the dropdown is actually opening, but there are no values available. Entering a character and then deleting it seems to fix the problem and causes the values to reappear again.

I'm currently investigating this and trying to narrow it down to a minimal test case. It seems like the issue has something to do with the value change handler not propagating correctly, but I'm not sure of the exact cause.

not-an-aardvark commented 6 years ago

It looks like this is fixed after upgrading to the latest version of react-select-plus. (The demo seems to still be on an old version.)