Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Aug 2, 2020
1 parent 03c4500 commit 8dbd4f0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 18 deletions.
2 changes: 1 addition & 1 deletion docs/pages/api-docs/text-field.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ The `MuiTextField` name can be used for providing [default props](/customization
| <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. |
| <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. |
| <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. |
| <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">rowsMin</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">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. |
| <span class="prop-name">SelectProps</span> | <span class="prop-type">object</span> | | Props applied to the [`Select`](/api/select/) element. |
| <span class="prop-name">size</span> | <span class="prop-type">'medium'<br>&#124;&nbsp;'small'</span> | | The size of the text field. |
Expand Down
6 changes: 1 addition & 5 deletions packages/material-ui/src/TextField/TextField.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,14 +326,10 @@ TextField.propTypes = {
* Number of rows to display when multiline option is set to true.
*/
rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
/**
* 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]),
rowsMin: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
/**
* 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.
Expand Down
8 changes: 0 additions & 8 deletions packages/material-ui/src/TextareaAutosize/TextareaAutosize.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,14 +197,6 @@ TextareaAutosize.propTypes = {
* @ignore
*/
placeholder: PropTypes.string,
/**
* Maximum number of rows to display.
*/
maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
/**
* Minimum number of rows to display.
*/
minRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
/**
* @ignore
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ describe('<TextareaAutosize />', () => {
expect(input.style).to.have.property('overflow', 'hidden');
});

it('should have at least height of "rowsMin"', () => {
const rowsMin = 3;
it('should have at least height of "minRows"', () => {
const minRows = 3;
const lineHeight = 15;
const { container, forceUpdate } = render(<TextareaAutosize rowsMin={rowsMin} />);
const { container, forceUpdate } = render(<TextareaAutosize minRows={minRows} />);
const input = container.querySelector('textarea[aria-hidden=null]');
const shadow = container.querySelector('textarea[aria-hidden=true]');
setLayout(input, shadow, {
Expand All @@ -156,7 +156,7 @@ describe('<TextareaAutosize />', () => {
lineHeight,
});
forceUpdate();
expect(input.style).to.have.property('height', `${lineHeight * rowsMin}px`);
expect(input.style).to.have.property('height', `${lineHeight * minRows}px`);
expect(input.style).to.have.property('overflow', '');
});

Expand Down

0 comments on commit 8dbd4f0

Please sign in to comment.