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

Failed prop type: The prop rows of ForwardRef(TextareaAutosize) is deprecated. Use rowsMin instead #27291

Closed
Nolesh opened this issue Jul 15, 2021 · 3 comments · Fixed by #27293
Labels
bug 🐛 Something doesn't work component: text field This is the name of the generic UI component, not the React module! v4.x v5.x migration
Milestone

Comments

@Nolesh
Copy link

Nolesh commented Jul 15, 2021

Recently, I've updated Material UI from '4.11.4' to '4.12.1' and got a few warnings about deprecation props. I fixed them all but one. When I use the multiline and rows props in the TextField component, I get the error:

Warning: Failed prop type: The prop `rows` of `ForwardRef(TextareaAutosize)` is deprecated. Use `rowsMin` instead.
    in ForwardRef(TextareaAutosize) (created by ForwardRef(InputBase))
    in ForwardRef(InputBase) (created by WithStyles(ForwardRef(InputBase)))
    in WithStyles(ForwardRef(InputBase)) (created by ForwardRef(Input))
    in ForwardRef(Input) (created by WithStyles(ForwardRef(Input)))
    in WithStyles(ForwardRef(Input)) (created by ForwardRef(TextField))
    in div (created by ForwardRef(FormControl))
    in ForwardRef(FormControl) (created by WithStyles(ForwardRef(FormControl)))
    in WithStyles(ForwardRef(FormControl)) (created by ForwardRef(TextField))
    in ForwardRef(TextField) (created by WithStyles(ForwardRef(TextField)))
    in WithStyles(ForwardRef(TextField)) (created by Test)
    in Test
    in Unknown (created by Context.Consumer)
    in Route (created by Nn)
    in Switch (created by Nn)
    in Nn (created by Un)
    in Un (created by Qn)
    in main (created by Qn)
    in Bt (created by Qn)
    in div (created by Qn)
    in Qn (created by App)
    in App
    in Router (created by BrowserRouter)
    in BrowserRouter

When I replace the rows with rowsMin, it says that this prop doesn't exist.
My code:

import React from 'react'

import {TextField as TF} from '@material-ui/core';

export const Test = () => {
  return (
    <TF
      name="name"
      label='Name'
      helperText="Text field example"
      multiline
      rows={3}
      maxRows={3}
      onChange={(val)=>{ console.log('onChange', val) }}
      />
  )
}

package.json:

"dependencies": {
    "@date-io/date-fns": "^1.3.13",
    "@material-ui/core": "~4.12.1",
    "@material-ui/icons": "^4.9.1",
    "@material-ui/lab": "^4.0.0-alpha.56",
    "@material-ui/pickers": "^3.2.10",
    ...
}
@eps1lon eps1lon added bug 🐛 Something doesn't work v4.x v5.x migration and removed v5.x migration labels Jul 15, 2021
@eps1lon eps1lon added this to the v5 milestone Jul 15, 2021
@eps1lon eps1lon added the component: text field This is the name of the generic UI component, not the React module! label Jul 15, 2021
@eps1lon eps1lon self-assigned this Jul 15, 2021
@eps1lon eps1lon linked a pull request Jul 15, 2021 that will close this issue
@eps1lon eps1lon removed their assignment Jul 15, 2021
@sjohnsonaz
Copy link

I'm having this issue as well.

@eps1lon
Copy link
Member

eps1lon commented Jul 18, 2021

Fixed in #27293 will release on monday.

@shereifsrf
Copy link

shereifsrf commented Jul 26, 2021

not sure if only for me, the fix isn't working.

react_devtools_backend.js:2574 Warning: Failed prop type: The prop rows of ForwardRef(TextareaAutosize) is deprecated. Use rowsMin instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: text field This is the name of the generic UI component, not the React module! v4.x v5.x migration
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants