
https://codesandbox.io/s/elastic-microservice-g4ypj?file=/src/Demo.js
| Tech | Version |
| ----------- | ------- |
| Material-UI | alpha 11 |
In our demo (text-field#multiline) we used to pass rowsMin (master) but switched to rows in next.
The TextField API now lists 3 props related to the number of rows: rows, minRows and maxRows. While fixing this bug we should probably get rid of rows as well. Too much choices in my opinion.
We forget to forward the prop:
diff --git a/packages/material-ui/src/TextField/TextField.js b/packages/material-ui/src/TextField/TextField.js
index 80470b797a..e606bf27f5 100644
--- a/packages/material-ui/src/TextField/TextField.js
+++ b/packages/material-ui/src/TextField/TextField.js
@@ -75,6 +75,7 @@ const TextField = React.forwardRef(function TextField(props, ref) {
inputRef,
label,
maxRows,
+ minRows,
multiline = false,
name,
onBlur,
@@ -137,6 +138,7 @@ const TextField = React.forwardRef(function TextField(props, ref) {
name={name}
rows={rows}
maxRows={maxRows}
+ minRows={minRows}
type={type}
value={value}
id={id}
minRows/maxRows works with TextareaAutosize only, while rows work with <textarea> only.
We used to mix the two use cases, it was creating confusion.
May I work on PR with this?
@suliskh All yours. Please let us know if you no longer intend to work on this issue. If you're stuck at any point feel free to open a PR so a maintainer can take a look.
Most helpful comment
May I work on PR with this?