I've stumbled upon this behavior after attempting to clear controlled TextField upon submitting its content, i.e. handleSubmit = () => this.setState({value: ""}); but the multilined TextField will not respond to an empty string, anything else will work though. Here's a simple demo: https://codesandbox.io/s/145wok5zw4
Since removing multiline prop will make things work as expected, I assumed it might be something exclusive to the Textarea.js module, but I did not have time to look at it yet.
Version v1.0.0-beta.13
https://github.com/callemall/material-ui/blob/4da17a67182a212be91a36cec9c976ccb6293380/src/Input/Input.js#L564
<textarea value={value ? String(value) : undefined} />
When the value of the textarea is undefined, the previous value does not change.
The irony is that it's a regression introduced by increasing the type checking (flow) of the lib with https://github.com/callemall/material-ui/commit/6f815c5cda#diff-deaeb5c7e253bfa4f497fa8ace0b3607R538 by @rosskevin
I'm on it. I'm gonna add a unit test to prevent future regression.
@oliviertassinari - yes I remember that one, I wasn't 100% sure about that in my flow fixing delirium. Thanks for taking care of that.
Most helpful comment
@oliviertassinari - yes I remember that one, I wasn't 100% sure about that in my flow fixing delirium. Thanks for taking care of that.