Reputation: 299
I am using react-select as a select dropdown. I've built my input in such a way that when the select is typed into, a debounced network request fires and then the drop down options are the result.
Code is located here:
https://codesandbox.io/embed/nameless-leftpad-o3zwl
Basically what's happening in the code above is that I'm creating an array of react selects and adding and removing one when the add or remove buttons are clicked.
I'm using the custom input so that I can get a callback ref attached to the input DOM node and auto-focus it when the "add select" button is clicked.
The first issue is this:
Second issue:
And here's my edited version without using the callback ref entirely:
https://codesandbox.io/embed/competent-cookies-tkfhc
The issue still remains
Upvotes: 2
Views: 9309
Reputation: 299
Answer linked on GitHub here: https://github.com/JedWatson/react-select/issues/3575
Upvotes: 2