ignores defaultValue property changes #11150
Labels
core
Infrastructure work going on behind the scenes
discussion
out of scope
The problem looks valid but we won't fix it (maybe we will revisit it in the future)
TextField properly paints defaultValue first time but ignores all further updates of defaulltValue.
See the demo of the bug:
Expected Behavior
TextField should always show current defaultValue.
Current Behavior
Only initial defaultValue is shown, all updates are ignored.
Steps to Reproduce (for bugs)
https://codesandbox.io/s/r50qpkywkp
Context
The real use case is to paint empty form, then load data via AJAX and fill in form.
Some libs (for example https://github.com/jeanlescure/material-ui-schema-form) uses TextField's defaultValue for initial field rendering, so if you update defaultValue property for already mounted TextField, the new value is simply ignored.
Your Environment
The latest version of Material-UI next branch and React. Any browser.
The text was updated successfully, but these errors were encountered: