Skip to content

Commit

Permalink
[Select] Accept boolean v2 (#12522)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari authored Aug 14, 2018
1 parent 3c389bb commit 769f7d4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/material-ui/src/Input/Input.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export interface InputProps
rowsMax?: string | number;
startAdornment?: React.ReactNode;
type?: string;
value?: Array<string | number> | string | number;
value?: Array<string | number | boolean> | string | number | boolean;
/**
* `onChange`, `onKeyUp` + `onKeyDown` are applied to the inner `InputComponent`,
* which by default is an input or textarea. Since these handlers differ from the
Expand Down
3 changes: 2 additions & 1 deletion packages/material-ui/src/Input/Input.js
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,8 @@ Input.propTypes = {
value: PropTypes.oneOfType([
PropTypes.string,
PropTypes.number,
PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),
PropTypes.bool,
PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.bool])),
]),
};

Expand Down
2 changes: 1 addition & 1 deletion pages/api/input.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ title: Input API
| <span class="prop-name">rowsMax</span> | <span class="prop-type">union:&nbsp;string&nbsp;&#124;<br>&nbsp;number<br> |   | Maximum number of rows to display when multiline option is set to true. |
| <span class="prop-name">startAdornment</span> | <span class="prop-type">node |   | Start `InputAdornment` for this component. |
| <span class="prop-name">type</span> | <span class="prop-type">string | <span class="prop-default">'text'</span> | Type of the input element. It should be a valid HTML5 input type. |
| <span class="prop-name">value</span> | <span class="prop-type">union:&nbsp;string&nbsp;&#124;<br>&nbsp;number&nbsp;&#124;<br>&nbsp;arrayOf<br> |   | The input value, required for a controlled component. |
| <span class="prop-name">value</span> | <span class="prop-type">union:&nbsp;string&nbsp;&#124;<br>&nbsp;number&nbsp;&#124;<br>&nbsp;bool&nbsp;&#124;<br>&nbsp;arrayOf<br> |   | The input value, required for a controlled component. |

Any other properties supplied will be spread to the root element (native element).

Expand Down

0 comments on commit 769f7d4

Please sign in to comment.