You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Above, a random list of numbers from 1 to 10 is generated as the options for the Select during onInputChange. You can see that the state variable being supplied to the options prop has the correct value during render, but the dropdown says there are no options. I couldn't really find any existing posts discussing this and the behavior seems incorrect.
It's worth noting that the correct values are displayed in the dropdown after the control loses and regains focus.
The text was updated successfully, but these errors were encountered:
zisadlier
changed the title
Dropdown not being properly rendered after options are updated within inputValueChange
Dropdown not being properly rendered after options are updated within onInputChange
Jan 8, 2021
zisadlier
changed the title
Dropdown not being properly rendered after options are updated within onInputChange
Dropdown menu not being properly rendered after options are updated within onInputChange
Jan 8, 2021
The "No Options" message you are receiving is because there are no options that match the filtered text you have entered since your options are randomly generated 1 digit numbers.
Try this example instead where I have prepended some text to the front and begin typing "Option" to see the options change as you type: Forked codesandbox
@ebonow Ah, thanks. In the actual code I'm having a problem with this the difference between typed text and options was subtle and that confusion prevented me from seeing that fairly obvious behavior.
Example: https://codesandbox.io/s/react-select-v3-sandbox-forked-03yem
Above, a random list of numbers from 1 to 10 is generated as the options for the Select during onInputChange. You can see that the state variable being supplied to the options prop has the correct value during render, but the dropdown says there are no options. I couldn't really find any existing posts discussing this and the behavior seems incorrect.
It's worth noting that the correct values are displayed in the dropdown after the control loses and regains focus.
The text was updated successfully, but these errors were encountered: