diff --git a/pages/api/text-field.md b/pages/api/text-field.md index 5a1bcf89a667a6..797a9668a1e987 100644 --- a/pages/api/text-field.md +++ b/pages/api/text-field.md @@ -64,7 +64,7 @@ For advanced cases, please look at the source of TextField by clicking on the | select | bool | false | Render a `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. | | SelectProps | object | | Properties applied to the `Select` element. | | type | string | | Type attribute of the `Input` element. It should be a valid HTML5 input type. | -| value | union: string |
 number |
 arrayOf
| | The value of the `Input` element, required for a controlled component. | +| value | union: string |
 number |
 bool |
 arrayOf
| | The value of the `Input` element, required for a controlled component. | Any other properties supplied will be [spread to the root element](/guides/api#spread). diff --git a/src/TextField/TextField.d.ts b/src/TextField/TextField.d.ts index a086232f8768a0..3eafa54c0f2d84 100644 --- a/src/TextField/TextField.d.ts +++ b/src/TextField/TextField.d.ts @@ -35,7 +35,7 @@ export interface TextFieldProps select?: boolean; SelectProps?: Partial; type?: string; - value?: Array | string | number; + value?: Array | string | number | boolean; } export type TextFieldClassKey = FormControlClassKey; diff --git a/src/TextField/TextField.js b/src/TextField/TextField.js index 6e58cff6218df5..1b0e0e1249a726 100644 --- a/src/TextField/TextField.js +++ b/src/TextField/TextField.js @@ -258,7 +258,8 @@ TextField.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])), ]), };