Skip to content

Commit ed6f8f3

Browse files
let's merge
1 parent 362d9f6 commit ed6f8f3

File tree

6 files changed

+5
-353
lines changed

6 files changed

+5
-353
lines changed

packages/material-ui/src/TextField/TextField.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export interface TextFieldProps
3535
select?: boolean;
3636
SelectProps?: Partial<SelectProps>;
3737
type?: string;
38-
value?: Array<string | number> | string | number;
38+
value?: Array<string | number | boolean> | string | number | boolean;
3939
}
4040

4141
export type TextFieldClassKey = FormControlClassKey;

packages/material-ui/src/TextField/TextField.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,8 @@ TextField.propTypes = {
260260
value: PropTypes.oneOfType([
261261
PropTypes.string,
262262
PropTypes.number,
263-
PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),
263+
PropTypes.bool,
264+
PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.bool])),
264265
]),
265266
};
266267

pages/api/text-field.md

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ For advanced cases, please look at the source of TextField by clicking on the
4040

4141
| Name | Type | Default | Description |
4242
|:-----|:-----|:--------|:------------|
43-
<<<<<<< HEAD
4443
| <span class="prop-name">autoComplete</span> | <span class="prop-type">string |   | This property helps users to fill forms faster, especially on mobile devices. The name can be confusing, as it's more like an autofill. You can learn more about it here: https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill |
4544
| <span class="prop-name">autoFocus</span> | <span class="prop-type">bool |   | If `true`, the input will be focused during the first mount. |
4645
| <span class="prop-name">defaultValue</span> | <span class="prop-type">union:&nbsp;string&nbsp;&#124;<br>&nbsp;number<br> |   | The default value of the `Input` element. |
@@ -66,41 +65,9 @@ For advanced cases, please look at the source of TextField by clicking on the
6665
| <span class="prop-name">select</span> | <span class="prop-type">bool | <span class="prop-default">false</span> | 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. |
6766
| <span class="prop-name">SelectProps</span> | <span class="prop-type">object |   | Properties applied to the [`Select`](/api/select) element. |
6867
| <span class="prop-name">type</span> | <span class="prop-type">string |   | Type attribute of the `Input` element. It should be a valid HTML5 input type. |
69-
| <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 value of the `Input` element, required for a controlled component. |
68+
| <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 value of the `Input` element, required for a controlled component. |
7069

7170
Any other properties supplied will be spread to the root element ([FormControl](/api/form-control)).
72-
=======
73-
| autoComplete | string | | This property helps users to fill forms faster, especially on mobile devices. The name can be confusing, as it's more like an autofill. You can learn more about it here: https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill |
74-
| autoFocus | bool | | If `true`, the input will be focused during the first mount. |
75-
| defaultValue | string | | The default value of the `Input` element. |
76-
| disabled | bool | | If `true`, the input will be disabled. |
77-
| error | bool | | If `true`, the label will be displayed in an error state. |
78-
| FormHelperTextProps | object | | Properties applied to the `FormHelperText` element. |
79-
| fullWidth | bool | | If `true`, the input will take up the full width of its container. |
80-
| helperText | node | | The helper text content. |
81-
| helperTextClassName | string | | The CSS class name of the helper text element. |
82-
| id | string | | The id of the `input` element. Use that property to make `label` and `helperText` accessible for screen readers. |
83-
| InputLabelProps | object | | Properties applied to the `InputLabel` element. |
84-
| InputProps | object | | Properties applied to the `Input` element. |
85-
| inputProps | object | | Properties applied to the native `input` element. |
86-
| inputRef | func | | Use that property to pass a ref callback to the native input component. |
87-
| label | node | | The label content. |
88-
| labelClassName | string | | The CSS class name of the label element. |
89-
| margin | enum:&nbsp;'none'&nbsp;&#124;<br>&nbsp;'dense'&nbsp;&#124;<br>&nbsp;'normal'<br> | | If `dense` or `normal`, will adjust vertical spacing of this and contained components. |
90-
| multiline | bool | | If `true`, a textarea element will be rendered instead of an input. |
91-
| name | string | | Name attribute of the `input` element. |
92-
| onChange | func | | Callback fired when the value is changed.<br><br>**Signature:**<br>`function(event: object) => void`<br>*event:* The event source of the callback |
93-
| placeholder | string | | The short hint displayed in the input before the user enters a value. |
94-
| required | bool | false | If `true`, the label is displayed as required. |
95-
| rows | union:&nbsp;string&nbsp;&#124;<br>&nbsp;number<br> | | Number of rows to display when multiline option is set to true. |
96-
| rowsMax | union:&nbsp;string&nbsp;&#124;<br>&nbsp;number<br> | | Maximum number of rows to display when multiline option is set to true. |
97-
| 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. |
98-
| SelectProps | object | | Properties applied to the `Select` element. |
99-
| type | string | | Type attribute of the `Input` element. It should be a valid HTML5 input type. |
100-
| value | union:&nbsp;string&nbsp;&#124;<br>&nbsp;number&nbsp;&#124;<br>&nbsp;bool&nbsp;&#124;<br>&nbsp;arrayOf<br> | | The value of the `Input` element, required for a controlled component. |
101-
102-
Any other properties supplied will be [spread to the root element](/guides/api#spread).
103-
>>>>>>> fc0da9d9e... [TextField] Accept boolean
10471

10572
## Inheritance
10673

pages/lab/api/speed-dial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ title: SpeedDial API
1919
| <span class="prop-name">ButtonProps</span> | <span class="prop-type">object |   | Properties applied to the [`Button`](/api/button) element. |
2020
| <span class="prop-name required">children *</span> | <span class="prop-type">node |   | SpeedDialActions to display when the SpeedDial is `open`. |
2121
| <span class="prop-name">classes</span> | <span class="prop-type">object |   | Override or extend the styles applied to the component. See [CSS API](#css-api) below for more details. |
22-
| <span class="prop-name">direction</span> | <span class="prop-type">enum:&nbsp;'up'&nbsp;&#124;<br>&nbsp;'down'&nbsp;&#124;<br>&nbsp;'left'&nbsp;&#124;<br>&nbsp;'right'<br> | <span class="prop-default">'top'</span> | The direction the actions open relative to the floating action button. |
22+
| <span class="prop-name">direction</span> | <span class="prop-type">enum:&nbsp;'up'&nbsp;&#124;<br>&nbsp;'down'&nbsp;&#124;<br>&nbsp;'left'&nbsp;&#124;<br>&nbsp;'right'<br> | <span class="prop-default">'up'</span> | The direction the actions open relative to the floating action button. |
2323
| <span class="prop-name">hidden</span> | <span class="prop-type">bool | <span class="prop-default">false</span> | If `true`, the SpeedDial will be hidden. |
2424
| <span class="prop-name required">icon *</span> | <span class="prop-type">element |   | The icon to display in the SpeedDial Floating Action Button. The `SpeedDialIcon` component provides a default Icon with animation. |
2525
| <span class="prop-name">onClose</span> | <span class="prop-type">func |   | Callback fired when the component requests to be closed.<br><br>**Signature:**<br>`function(event: object, key: string) => void`<br>*event:* The event source of the callback<br>*key:* The key pressed |

src/TextField/TextField.d.ts

Lines changed: 0 additions & 45 deletions
This file was deleted.

src/TextField/TextField.js

Lines changed: 0 additions & 271 deletions
This file was deleted.

0 commit comments

Comments
 (0)