Skip to content

Commit

Permalink
[Select] Document how values are compared (#17912)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dustin Robison authored and oliviertassinari committed Oct 18, 2019
1 parent 910da29 commit 0a6d9a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/pages/api/select.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ You can learn more about the difference by [reading this guide](/guides/minimizi
| <span class="prop-name">open</span> | <span class="prop-type">bool</span> | | Control `select` open state. You can only use it when the `native` prop is `false` (default). |
| <span class="prop-name">renderValue</span> | <span class="prop-type">func</span> | | Render the selected value. You can only use it when the `native` prop is `false` (default).<br><br>**Signature:**<br>`function(value: any) => ReactElement`<br>*value:* The `value` provided to the component. |
| <span class="prop-name">SelectDisplayProps</span> | <span class="prop-type">object</span> | | Props applied to the clickable div element. |
| <span class="prop-name">value</span> | <span class="prop-type">any</span> | | The input value. Providing an empty string will select no options. This prop is required when the `native` prop is `false` (default). Set to an empty string `''` if you don't want any of the available options to be selected. |
| <span class="prop-name">value</span> | <span class="prop-type">any</span> | | The input value. Providing an empty string will select no options. This prop is required when the `native` prop is `false` (default). Set to an empty string `''` if you don't want any of the available options to be selected.<br>If the value is an object it must have reference equality with the option in order to be selected. If the value is not an object, the string representation must match with the string representation of the option in order to be selected. |
| <span class="prop-name">variant</span> | <span class="prop-type">'standard'<br>&#124;&nbsp;'outlined'<br>&#124;&nbsp;'filled'</span> | <span class="prop-default">'standard'</span> | The variant to use. |

The `ref` is forwarded to the root element.
Expand Down
3 changes: 3 additions & 0 deletions packages/material-ui/src/Select/Select.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ Select.propTypes = {
* The input value. Providing an empty string will select no options.
* This prop is required when the `native` prop is `false` (default).
* Set to an empty string `''` if you don't want any of the available options to be selected.
*
* If the value is an object it must have reference equality with the option in order to be selected.
* If the value is not an object, the string representation must match with the string representation of the option in order to be selected.
*/
value: PropTypes.any,
/**
Expand Down

0 comments on commit 0a6d9a5

Please sign in to comment.