Material-ui: [TextField] Multiline textfields (EnhancedTextarea) are still using valueLink

Created on 16 Aug 2017  ·  10Comments  ·  Source: mui-org/material-ui

Problem description

Multiline textfields are still using the valueLink prop, causing warnings to be thrown.

warning.js:35 Warning: Unknown prop `valueLink` on <textarea> tag. Remove this prop from the element. For details, see https://fb.me/react-unknown-prop
    in textarea (created by EnhancedTextarea)
    in div (created by EnhancedTextarea)
    in EnhancedTextarea (created by TextField)
    in div (created by TextField)
    in MuiComponent
    in div (created by DialogInline)
    in div (created by Paper)
    in Paper (created by DialogInline)
    in div (created by TransitionItem)
    in TransitionItem (created by TransitionGroup)
    in div (created by TransitionGroup)
    in TransitionGroup (created by DialogInline)
    in div (created by DialogInline)
    in DialogInline

Steps to reproduce

<TextField multilLine value={props.binding}/>

Versions

  • Material-UI: 0.19.0
  • React: 16.0.0-beta.5
  • Browser: Chrome latest, Firefox Nightly

Edit: Yes, I have read https://github.com/callemall/material-ui/issues/2880.

Since valueLink has been deprecated for such a long time, I believe that simply removing the 6 references to it in EnhancedTextarea.js is the appropriate way to go. If someone is still using that... Well don't upgrade to 0.19 ¯_(ツ)_/¯.

I can provide a PR if needed.

bug 🐛 TextField v0.x

Most helpful comment

Would be helpful to fix in 0.19 because I don't think everybody will upgrade to v1 since it's such a big change.
Thanks.

All 10 comments

Looking at #2880 I have the feeling that we have more components affected by this issue. How deprecated this issue, react@latest? I guess we can go ahead and remove it everywhere then.

Anyway, the issue seems to be inactive, we have removed the occurrences of valueLink in the v1-beta branch.

Would be helpful to fix in 0.19 because I don't think everybody will upgrade to v1 since it's such a big change.
Thanks.

@bogdansoare If you find a non breaking change way to implement this change, we will definitely review your PR 👍.

Would @oliviertassinari it be as simple as passing the valueLink prop only if defined?
https://github.com/callemall/material-ui/blob/6d5a2523192f2b098098b24ebc914c856c186b63/src/TextField/EnhancedTextarea.js#L181

@santialbo It could be yes. Last time I used valueLink was a long time ago.

Is that fixed ?? I'm still having the same issue today

"material-ui": "^0.19.3"

@iroy2000 it's fixed on master but it hasn't been released yet.

Any estimates when will it release? Thanks

@writetosalman It must have been released by now. I can't see it in https://github.com/callemall/material-ui/compare/v0.19.4...master.

Was this page helpful?
0 / 5 - 0 ratings