Skip to content
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

React warning on TextField #113

Closed
advance512 opened this issue Mar 12, 2017 · 5 comments
Closed

React warning on TextField #113

advance512 opened this issue Mar 12, 2017 · 5 comments

Comments

@advance512
Copy link

advance512 commented Mar 12, 2017

Warning: TextField contains an input of type text with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://fb.me/react-controlled-components

[email protected]
[email protected]
[email protected]
[email protected]

@ghost
Copy link

ghost commented Apr 6, 2017

I'm still seeing this with 4.1.3.

@nmaves
Copy link
Contributor

nmaves commented Apr 6, 2017

Can you post your code here?

@ghost
Copy link

ghost commented Apr 6, 2017

Hmm... I was setting defaultValue={null}. Removing this fixed the warning. I assume there was a good reason I had that in there, but it doesn't seem to be necessary now.

Not sure if @advance512 is still seeing this warning - perhaps this issue can be closed.

@erikras
Copy link
Owner

erikras commented Apr 14, 2017

You need to remove the defaultValue={null} on TimePicker and DatePicker.

#60

@k96white
Copy link

Is there any solution for this, I wanted both of them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants