Skip to content

Commit

Permalink
[Select] Add to docs that options must be direct descendants (#15619)
Browse files Browse the repository at this point in the history
* [Select] Options must be direct descendants

* [NativeSelect] Options must be direct descendants

* Add yarn docs:api changes

* only Select
  • Loading branch information
bh1505 authored and oliviertassinari committed May 8, 2019
1 parent ff5d309 commit 0bb185c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/material-ui/src/Select/Select.js
Expand Up @@ -87,6 +87,8 @@ Select.propTypes = {
/**
* The option elements to populate the select with.
* Can be some `MenuItem` when `native` is false and `option` when `native` is true.
*
* ⚠️The `MenuItem` elements **must** be direct descendants when `native` is false.
*/
children: PropTypes.node,
/**
Expand Down
2 changes: 1 addition & 1 deletion pages/api/select.md
Expand Up @@ -19,7 +19,7 @@ import Select from '@material-ui/core/Select';
| Name | Type | Default | Description |
|:-----|:-----|:--------|:------------|
| <span class="prop-name">autoWidth</span> | <span class="prop-type">bool</span> | <span class="prop-default">false</span> | If true, the width of the popover will automatically be set according to the items inside the menu, otherwise it will be at least the width of the select input. |
| <span class="prop-name">children</span> | <span class="prop-type">node</span> | | The option elements to populate the select with. Can be some `MenuItem` when `native` is false and `option` when `native` is true. |
| <span class="prop-name">children</span> | <span class="prop-type">node</span> | | The option elements to populate the select with. Can be some `MenuItem` when `native` is false and `option` when `native` is true.<br>⚠️The `MenuItem` elements **must** be direct descendants when `native` is false. |
| <span class="prop-name">classes</span> | <span class="prop-type">object</span> | | Override or extend the styles applied to the component. See [CSS API](#css) below for more details. |
| <span class="prop-name">displayEmpty</span> | <span class="prop-type">bool</span> | <span class="prop-default">false</span> | If `true`, the selected item is displayed even if its value is empty. You can only use it when the `native` property is `false` (default). |
| <span class="prop-name">IconComponent</span> | <span class="prop-type">elementType</span> | <span class="prop-default">ArrowDropDownIcon</span> | The icon that displays the arrow. |
Expand Down

0 comments on commit 0bb185c

Please sign in to comment.