Skip to content

Commit

Permalink
[TextareaAutosize] Updated deprecation warning to suggest minRows ins…
Browse files Browse the repository at this point in the history
…tead of rowsMin (#27398)
  • Loading branch information
HumbertoL authored Jul 22, 2021
1 parent 958241a commit 8fd66a1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/pages/api-docs/textarea-autosize.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ You can learn more about the difference by [reading this guide](/guides/minimizi
|:-----|:-----|:--------|:------------|
| <span class="prop-name">maxRows</span> | <span class="prop-type">number<br>&#124;&nbsp;string</span> | | Maximum number of rows to display. |
| <span class="prop-name">minRows</span> | <span class="prop-type">number<br>&#124;&nbsp;string</span> | <span class="prop-default">1</span> | Minimum number of rows to display. |
| ~~<span class="prop-name">rows</span>~~ | <span class="prop-type">oneOfType([PropTypes.number</span> | | *Deprecated*. Use `rowsMin` instead.<br><br>Minimum number of rows to display. |
| ~~<span class="prop-name">rows</span>~~ | <span class="prop-type">oneOfType([PropTypes.number</span> | | *Deprecated*. Use `minRows` instead.<br><br>Minimum number of rows to display. |
| ~~<span class="prop-name">rowsMax</span>~~ | <span class="prop-type">oneOfType([PropTypes.number</span> | | *Deprecated*. Use `maxRows` instead.<br><br>Maximum number of rows to display. |
| ~~<span class="prop-name">rowsMin</span>~~ | <span class="prop-type">oneOfType([PropTypes.number</span> | | *Deprecated*. Use `minRows` instead.<br><br>Minimum number of rows to display. |

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export interface TextareaAutosizeProps
ref?: React.Ref<HTMLTextAreaElement>;
/**
* Minimum number of rows to display.
* @deprecated Use `rowsMin` instead.
* @deprecated Use `minRows` instead.
*/
rows?: string | number;
/**
Expand Down
4 changes: 2 additions & 2 deletions packages/material-ui/src/TextareaAutosize/TextareaAutosize.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,11 +213,11 @@ TextareaAutosize.propTypes = {
placeholder: PropTypes.string,
/**
* Minimum number of rows to display.
* @deprecated Use `rowsMin` instead.
* @deprecated Use `minRows` instead.
*/
rows: deprecatedPropType(
PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
'Use `rowsMin` instead.',
'Use `minRows` instead.',
),
/**
* Maximum number of rows to display.
Expand Down

0 comments on commit 8fd66a1

Please sign in to comment.