Skip to content

Commit

Permalink
fix 'TODO: why no minRows?'
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Aug 2, 2020
1 parent 5fbbf3f commit 322ff33
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/pages/api-docs/filled-input.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ The `MuiFilledInput` name can be used for providing [default props](/customizati
| <span class="prop-name">inputRef</span> | <span class="prop-type">ref</span> | | Pass a ref to the `input` element. |
| <span class="prop-name">margin</span> | <span class="prop-type">'dense'<br>&#124;&nbsp;'none'</span> | | If `dense`, will adjust vertical spacing. This is normally obtained via context from FormControl. |
| <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. |
| <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. |
| <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. |
| <span class="prop-name">name</span> | <span class="prop-type">string</span> | | Name attribute of the `input` element. |
| <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). |
Expand Down
1 change: 1 addition & 0 deletions docs/pages/api-docs/input.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ The `MuiInput` name can be used for providing [default props](/customization/glo
| <span class="prop-name">inputRef</span> | <span class="prop-type">ref</span> | | Pass a ref to the `input` element. |
| <span class="prop-name">margin</span> | <span class="prop-type">'dense'<br>&#124;&nbsp;'none'</span> | | If `dense`, will adjust vertical spacing. This is normally obtained via context from FormControl. |
| <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. |
| <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. |
| <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. |
| <span class="prop-name">name</span> | <span class="prop-type">string</span> | | Name attribute of the `input` element. |
| <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). |
Expand Down
1 change: 1 addition & 0 deletions docs/pages/api-docs/outlined-input.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ The `MuiOutlinedInput` name can be used for providing [default props](/customiza
| <span class="prop-name">labelWidth</span> | <span class="prop-type">number</span> | <span class="prop-default">0</span> | The width of the label. Is ignored if `label` is provided. Prefer `label` if the input label appears with a strike through. |
| <span class="prop-name">margin</span> | <span class="prop-type">'dense'<br>&#124;&nbsp;'none'</span> | | If `dense`, will adjust vertical spacing. This is normally obtained via context from FormControl. |
| <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. |
| <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. |
| <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. |
| <span class="prop-name">name</span> | <span class="prop-type">string</span> | | Name attribute of the `input` element. |
| <span class="prop-name">notched</span> | <span class="prop-type">bool</span> | | If `true`, the outline is notched to accommodate the label. |
Expand Down
4 changes: 4 additions & 0 deletions packages/material-ui/src/FilledInput/FilledInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,10 @@ FilledInput.propTypes = {
* Maximum number of rows to display when multiline option is set to true.
*/
maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
/**
* Minimum number of rows to display when multiline option is set to true.
*/
minRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
/**
* If `true`, a textarea element will be rendered.
*/
Expand Down
4 changes: 4 additions & 0 deletions packages/material-ui/src/Input/Input.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ Input.propTypes = {
* Maximum number of rows to display when multiline option is set to true.
*/
maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
/**
* Minimum number of rows to display when multiline option is set to true.
*/
minRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
/**
* If `true`, a textarea element will be rendered.
*/
Expand Down
4 changes: 4 additions & 0 deletions packages/material-ui/src/OutlinedInput/OutlinedInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,10 @@ OutlinedInput.propTypes = {
* Maximum number of rows to display when multiline option is set to true.
*/
maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
/**
* Minimum number of rows to display when multiline option is set to true.
*/
minRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
/**
* If `true`, a textarea element will be rendered.
*/
Expand Down
2 changes: 1 addition & 1 deletion scripts/generateProptypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ const useExternalPropsFromInputBase = [
'inputRef',
'margin',
'maxRows',
'minRows',
'name',
'onChange',
'placeholder',
'readOnly',
'required',
'rows',
// TODO: why no minRows?
'startAdornment',
'value',
];
Expand Down

0 comments on commit 322ff33

Please sign in to comment.