Skip to content

Commit 5fbbf3f

Browse files
fix ci
1 parent 03c4500 commit 5fbbf3f

File tree

5 files changed

+10
-22
lines changed

5 files changed

+10
-22
lines changed

docs/pages/api-docs/text-field.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,13 @@ The `MuiTextField` name can be used for providing [default props](/customization
7575
| <span class="prop-name">label</span> | <span class="prop-type">node</span> | | The label content. |
7676
| <span class="prop-name">margin</span> | <span class="prop-type">'dense'<br>&#124;&nbsp;'none'<br>&#124;&nbsp;'normal'</span> | | If `dense` or `normal`, will adjust vertical spacing of this and contained components. |
7777
| <span class="prop-name">maxRows</span> | <span class="prop-type">number<br>&#124;&nbsp;string</span> | | Maximum number of rows to display when multiline option is set to true. |
78+
| <span class="prop-name">minRows</span> | <span class="prop-type">number<br>&#124;&nbsp;string</span> | | Minimum number of rows to display when multiline option is set to true. |
7879
| <span class="prop-name">multiline</span> | <span class="prop-type">bool</span> | <span class="prop-default">false</span> | If `true`, a textarea element will be rendered instead of an input. |
7980
| <span class="prop-name">name</span> | <span class="prop-type">string</span> | | Name attribute of the `input` element. |
8081
| <span class="prop-name">onChange</span> | <span class="prop-type">func</span> | | Callback fired when the value is changed.<br><br>**Signature:**<br>`function(event: object) => void`<br>*event:* The event source of the callback. You can pull out the new value by accessing `event.target.value` (string). |
8182
| <span class="prop-name">placeholder</span> | <span class="prop-type">string</span> | | The short hint displayed in the input before the user enters a value. |
8283
| <span class="prop-name">required</span> | <span class="prop-type">bool</span> | <span class="prop-default">false</span> | If `true`, the label is displayed as required and the `input` element will be required. |
8384
| <span class="prop-name">rows</span> | <span class="prop-type">number<br>&#124;&nbsp;string</span> | | Number of rows to display when multiline option is set to true. |
84-
| <span class="prop-name">minRows</span> | <span class="prop-type">number<br>&#124;&nbsp;string</span> | | Minimum number of rows to display when multiline option is set to true. |
8585
| <span class="prop-name">select</span> | <span class="prop-type">bool</span> | <span class="prop-default">false</span> | Render a [`Select`](/api/select/) element while passing the Input element to `Select` as `input` parameter. If this option is set you must pass the options of the select as children. |
8686
| <span class="prop-name">SelectProps</span> | <span class="prop-type">object</span> | | Props applied to the [`Select`](/api/select/) element. |
8787
| <span class="prop-name">size</span> | <span class="prop-type">'medium'<br>&#124;&nbsp;'small'</span> | | The size of the text field. |

packages/material-ui/src/TextField/TextField.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export interface BaseTextFieldProps
112112
/**
113113
* Minimum number of rows to display when multiline option is set to true.
114114
*/
115-
rowsMin?: string | number;
115+
minRows?: string | number;
116116
/**
117117
* Render a [`Select`](/api/select/) element while passing the Input element to `Select` as `input` parameter.
118118
* If this option is set you must pass the options of the select as children.

packages/material-ui/src/TextField/TextField.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,10 @@ TextField.propTypes = {
291291
* Maximum number of rows to display when multiline option is set to true.
292292
*/
293293
maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
294+
/**
295+
* Minimum number of rows to display when multiline option is set to true.
296+
*/
297+
minRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
294298
/**
295299
* If `true`, a textarea element will be rendered instead of an input.
296300
*/
@@ -326,14 +330,6 @@ TextField.propTypes = {
326330
* Number of rows to display when multiline option is set to true.
327331
*/
328332
rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
329-
/**
330-
* Maximum number of rows to display when multiline option is set to true.
331-
*/
332-
maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
333-
/**
334-
* Minimum number of rows to display when multiline option is set to true.
335-
*/
336-
minRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
337333
/**
338334
* Render a [`Select`](/api/select/) element while passing the Input element to `Select` as `input` parameter.
339335
* If this option is set you must pass the options of the select as children.

packages/material-ui/src/TextareaAutosize/TextareaAutosize.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -197,14 +197,6 @@ TextareaAutosize.propTypes = {
197197
* @ignore
198198
*/
199199
placeholder: PropTypes.string,
200-
/**
201-
* Maximum number of rows to display.
202-
*/
203-
maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
204-
/**
205-
* Minimum number of rows to display.
206-
*/
207-
minRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
208200
/**
209201
* @ignore
210202
*/

packages/material-ui/src/TextareaAutosize/TextareaAutosize.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,10 @@ describe('<TextareaAutosize />', () => {
142142
expect(input.style).to.have.property('overflow', 'hidden');
143143
});
144144

145-
it('should have at least height of "rowsMin"', () => {
146-
const rowsMin = 3;
145+
it('should have at least height of "minRows"', () => {
146+
const minRows = 3;
147147
const lineHeight = 15;
148-
const { container, forceUpdate } = render(<TextareaAutosize rowsMin={rowsMin} />);
148+
const { container, forceUpdate } = render(<TextareaAutosize minRows={minRows} />);
149149
const input = container.querySelector('textarea[aria-hidden=null]');
150150
const shadow = container.querySelector('textarea[aria-hidden=true]');
151151
setLayout(input, shadow, {
@@ -156,7 +156,7 @@ describe('<TextareaAutosize />', () => {
156156
lineHeight,
157157
});
158158
forceUpdate();
159-
expect(input.style).to.have.property('height', `${lineHeight * rowsMin}px`);
159+
expect(input.style).to.have.property('height', `${lineHeight * minRows}px`);
160160
expect(input.style).to.have.property('overflow', '');
161161
});
162162

0 commit comments

Comments
 (0)