-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
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
[FormControl] Maximum update depth exceeded #12197
Comments
@Mangatt You can only use a single input within a |
Noted, thanks. I would probably mention that in [FormControl] docs, it's better than finding out yourself. |
@Mangatt I agree, I think that we could add a note about it in the Is this something you want to work on? :) |
Sure, I can try. Let me dive into contributing guidelines first. |
This no longer happens in master. See this sandbox: https://codesandbox.io/s/material-ui-issue-forked-my1u6?file=/src/Demo.js I've bisected it was (probably unexpectedly) fixed in #17436 (version 4.4.3 onward), but the warning message from #16907 is still shown. Is it something that should be avoided even if it works? I have a use case where I need to have a composed control of a |
@voliva We recommend to avoid it because some states are meant to impact a single textbox, e.g. focused, filled. |
Apparently, [FormControl] component supports only one [Input]. Following code throws error Maximum update depth exceeded
When both [Input]s are with empty value or both are filled, everything is okay. When one is filled and other is not, error is thrown.
I'm not sure if this is bug, but if that is intentional, I guess that Docs should mention that and React.Children.only should be used.
The text was updated successfully, but these errors were encountered: