-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MultipleSelect] isCreatable props has stopped working #36
Comments
this still doesn't work for me i have to show two types of data
|
Hi @iulian-radu-at, can you take a look at it, please? I'd like to use a combination of MultiSelect with TextField, but no chance right now. Thanks in advance! |
Hi, The problem is how to integrate react-select-material-ui with https://react-hook-form.com/ Here is an example https://codesandbox.io/s/react-hook-form-react-select-material-ui-integration-zubob?file=/src/index.js Cheers, |
Hi @AnushreeDhar, Maybe you can use the following code:
Please let me know if it worked for your use case. Cheers, |
Hi @mackankowski and @keemor, What are exactly your problems? @mackankowski I checked with older version and it never worked. Please take into account that react-hook-form always provides a value for the props value/values of react-slect-material-ui and this value should match an option. But as long as isCreatable is true and onChange returns the new value (which is saved) but the options are not updated, I do not expect react-select-material-ui to work as you expect. I appreciate all the problems you are reporting and I thank you for this, but as long as after investigating them I do not find them connected with a bug in react-select-material-ui I will not invest to much time for trying to provide you a solution. Cheers, |
Hi @iulian-radu-at and @mackankowski, Thank you for investigating, I was aware that the problem lied in integration with RHF, but wasn't sure where to get help. Actually I added onChange={value => value} to Controller and that solved the problem.
Thank you for the support, your library creates a great and unified solution with material-ui and react-hook-form 😃 |
Thank you for your collaboration. All issues have been solved. |
Hi @iulian-radu-at,
I put an extra topic for my little issue. isCreatable props don't seem to work for MultipleSelect: when typing, a new value is shown but cannot be added to the list. I'm sure that I was working before. The issue appears on different versions of the library.
Sample codebase:
https://codesandbox.io/s/modern-hooks-b6reu?file=/src/components/MyForm.tsx
Please help investigating.
Best regards,
Maciej
The text was updated successfully, but these errors were encountered: