diff --git a/packages/material-ui/src/NativeSelect/NativeSelect.d.ts b/packages/material-ui/src/NativeSelect/NativeSelect.d.ts index 8d986d170a7c9f..82042f29a10962 100644 --- a/packages/material-ui/src/NativeSelect/NativeSelect.d.ts +++ b/packages/material-ui/src/NativeSelect/NativeSelect.d.ts @@ -9,7 +9,7 @@ export interface NativeSelectProps Pick { IconComponent?: React.ReactType; input?: React.ReactNode; - value?: string | number; + value?: string | number | boolean; } export type NativeSelectClassKey = 'root' | 'select' | 'selectMenu' | 'disabled' | 'icon'; diff --git a/packages/material-ui/src/NativeSelect/NativeSelect.js b/packages/material-ui/src/NativeSelect/NativeSelect.js index 5e006741fead27..32a23d90551a6c 100644 --- a/packages/material-ui/src/NativeSelect/NativeSelect.js +++ b/packages/material-ui/src/NativeSelect/NativeSelect.js @@ -120,7 +120,7 @@ NativeSelect.propTypes = { /** * The input value. */ - value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), + value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.bool]), }; NativeSelect.defaultProps = { diff --git a/packages/material-ui/src/NativeSelect/NativeSelectInput.d.ts b/packages/material-ui/src/NativeSelect/NativeSelectInput.d.ts index cf3d1cf22120d9..8a6370e251101c 100644 --- a/packages/material-ui/src/NativeSelect/NativeSelectInput.d.ts +++ b/packages/material-ui/src/NativeSelect/NativeSelectInput.d.ts @@ -8,7 +8,7 @@ export interface NativeSelectInputProps { ) => void; name?: string; onChange?: (event: React.ChangeEvent, child: React.ReactNode) => void; - value?: string | number; + value?: string | number | boolean; } declare const NativeSelectInput: React.ComponentType; diff --git a/packages/material-ui/src/NativeSelect/NativeSelectInput.js b/packages/material-ui/src/NativeSelect/NativeSelectInput.js index 4c8be6a7176d00..675bd75175bec8 100644 --- a/packages/material-ui/src/NativeSelect/NativeSelectInput.js +++ b/packages/material-ui/src/NativeSelect/NativeSelectInput.js @@ -84,7 +84,7 @@ NativeSelectInput.propTypes = { /** * The input value. */ - value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), + value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.bool]), }; export default NativeSelectInput; diff --git a/packages/material-ui/src/Select/Select.d.ts b/packages/material-ui/src/Select/Select.d.ts index 260e9f8c850adb..3d2116014878e3 100644 --- a/packages/material-ui/src/Select/Select.d.ts +++ b/packages/material-ui/src/Select/Select.d.ts @@ -19,7 +19,7 @@ export interface SelectProps open?: boolean; renderValue?: (value: SelectProps['value']) => React.ReactNode; SelectDisplayProps?: React.HTMLAttributes; - value?: Array | string | number; + value?: Array | string | number | boolean; } export type SelectClassKey = 'root' | 'select' | 'selectMenu' | 'disabled' | 'icon'; diff --git a/packages/material-ui/src/Select/Select.js b/packages/material-ui/src/Select/Select.js index 69b00a205aabca..6b01c1f280cf6c 100644 --- a/packages/material-ui/src/Select/Select.js +++ b/packages/material-ui/src/Select/Select.js @@ -162,7 +162,8 @@ Select.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])), ]), }; diff --git a/packages/material-ui/src/Select/SelectInput.d.ts b/packages/material-ui/src/Select/SelectInput.d.ts index 19f60bb2254126..eba18162541486 100644 --- a/packages/material-ui/src/Select/SelectInput.d.ts +++ b/packages/material-ui/src/Select/SelectInput.d.ts @@ -23,7 +23,7 @@ export interface SelectInputProps { renderValue?: (value: SelectInputProps['value']) => React.ReactNode; SelectDisplayProps?: React.HTMLAttributes; tabIndex?: number; - value?: string | number | Array; + value?: string | number | boolean | Array; } declare const SelectInput: React.ComponentType; diff --git a/packages/material-ui/src/Select/SelectInput.js b/packages/material-ui/src/Select/SelectInput.js index 94a5b79494b42f..80cf98b55de54f 100644 --- a/packages/material-ui/src/Select/SelectInput.js +++ b/packages/material-ui/src/Select/SelectInput.js @@ -439,7 +439,8 @@ SelectInput.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])), ]).isRequired, }; diff --git a/pages/api/native-select.md b/pages/api/native-select.md index be32248196e649..34544c73d9ff66 100644 --- a/pages/api/native-select.md +++ b/pages/api/native-select.md @@ -21,7 +21,7 @@ An alternative to `