Skip to content

Commit

Permalink
let's merge
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Aug 15, 2018
1 parent 362d9f6 commit ed6f8f3
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 353 deletions.
2 changes: 1 addition & 1 deletion packages/material-ui/src/TextField/TextField.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export interface TextFieldProps
select?: boolean;
SelectProps?: Partial<SelectProps>;
type?: string;
value?: Array<string | number> | string | number;
value?: Array<string | number | boolean> | string | number | boolean;
}

export type TextFieldClassKey = FormControlClassKey;
Expand Down
3 changes: 2 additions & 1 deletion packages/material-ui/src/TextField/TextField.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,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])),
]),
};

Expand Down
35 changes: 1 addition & 34 deletions pages/api/text-field.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ For advanced cases, please look at the source of TextField by clicking on the

| Name | Type | Default | Description |
|:-----|:-----|:--------|:------------|
<<<<<<< HEAD
| <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 |
| <span class="prop-name">autoFocus</span> | <span class="prop-type">bool |   | If `true`, the input will be focused during the first mount. |
| <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. |
Expand All @@ -66,41 +65,9 @@ For advanced cases, please look at the source of TextField by clicking on the
| <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. |
| <span class="prop-name">SelectProps</span> | <span class="prop-type">object |   | Properties applied to the [`Select`](/api/select) element. |
| <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. |
| <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. |
| <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. |

Any other properties supplied will be spread to the root element ([FormControl](/api/form-control)).
=======
| 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 |
| autoFocus | bool | | If `true`, the input will be focused during the first mount. |
| defaultValue | string | | The default value of the `Input` element. |
| disabled | bool | | If `true`, the input will be disabled. |
| error | bool | | If `true`, the label will be displayed in an error state. |
| FormHelperTextProps | object | | Properties applied to the `FormHelperText` element. |
| fullWidth | bool | | If `true`, the input will take up the full width of its container. |
| helperText | node | | The helper text content. |
| helperTextClassName | string | | The CSS class name of the helper text element. |
| id | string | | The id of the `input` element. Use that property to make `label` and `helperText` accessible for screen readers. |
| InputLabelProps | object | | Properties applied to the `InputLabel` element. |
| InputProps | object | | Properties applied to the `Input` element. |
| inputProps | object | | Properties applied to the native `input` element. |
| inputRef | func | | Use that property to pass a ref callback to the native input component. |
| label | node | | The label content. |
| labelClassName | string | | The CSS class name of the label element. |
| 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. |
| multiline | bool | | If `true`, a textarea element will be rendered instead of an input. |
| name | string | | Name attribute of the `input` element. |
| 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 |
| placeholder | string | | The short hint displayed in the input before the user enters a value. |
| required | bool | false | If `true`, the label is displayed as required. |
| rows | union:&nbsp;string&nbsp;&#124;<br>&nbsp;number<br> | | Number of rows to display when multiline option is set to true. |
| rowsMax | union:&nbsp;string&nbsp;&#124;<br>&nbsp;number<br> | | Maximum number of rows to display when multiline option is set to true. |
| 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:&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. |

Any other properties supplied will be [spread to the root element](/guides/api#spread).
>>>>>>> fc0da9d9e... [TextField] Accept boolean

## Inheritance

Expand Down
2 changes: 1 addition & 1 deletion pages/lab/api/speed-dial.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ title: SpeedDial API
| <span class="prop-name">ButtonProps</span> | <span class="prop-type">object |   | Properties applied to the [`Button`](/api/button) element. |
| <span class="prop-name required">children *</span> | <span class="prop-type">node |   | SpeedDialActions to display when the SpeedDial is `open`. |
| <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. |
| <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. |
| <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. |
| <span class="prop-name">hidden</span> | <span class="prop-type">bool | <span class="prop-default">false</span> | If `true`, the SpeedDial will be hidden. |
| <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. |
| <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 |
Expand Down
45 changes: 0 additions & 45 deletions src/TextField/TextField.d.ts

This file was deleted.

271 changes: 0 additions & 271 deletions src/TextField/TextField.js

This file was deleted.

0 comments on commit ed6f8f3

Please sign in to comment.