-
We discovered a potential bug on combobox when we tested the component with the following snippet (
The display still works, but with the following console error It seems like the downshift component in Combobox doesn't like when we flip from an uncontrolled to a controlled input. Or perhaps there is something wrong with our implementation? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 5 replies
-
Hey @yannieyip - I'm forwarding this question along to our eng team, so we'll get back to you soon! |
Beta Was this translation helpful? Give feedback.
-
Hey @yannieyip, React components like Combobox require developers to do use controlled or uncontrolled components, and complains if you swap between approaches.
Based on the error I would need to see the full code for the |
Beta Was this translation helpful? Give feedback.
-
Thanks for the up to date code example. For future reference Codesandbox runs in Dev mode so it's easily reproducible there for us. https://codesandbox.io/s/controlled-combobox-repro-xhjqs?file=/src/index.tsx Seems an update to Downshift changed their API slightly. Thanks for the report, we'll get it updated pretty quickly |
Beta Was this translation helpful? Give feedback.
-
Though, having said that, you might be better off going all in on controlling state with the useCombobox hook https://paste.twilio.design/components/combobox#usecombobox-state-hook |
Beta Was this translation helpful? Give feedback.
Thanks for the up to date code example.
For future reference Codesandbox runs in Dev mode so it's easily reproducible there for us. https://codesandbox.io/s/controlled-combobox-repro-xhjqs?file=/src/index.tsx
Seems an update to Downshift changed their API slightly.
Thanks for the report, we'll get it updated pretty quickly