From fde2343456f290e382caa352cc0fede5f325e8aa Mon Sep 17 00:00:00 2001 From: aurnik Date: Thu, 20 Feb 2020 06:30:52 +0800 Subject: [PATCH] [docs] Fix typo in Autocomplete (#19775) --- docs/pages/api/autocomplete.md | 2 +- docs/src/pages/components/autocomplete/autocomplete.md | 2 +- packages/material-ui-lab/src/Autocomplete/Autocomplete.js | 2 +- .../material-ui-lab/src/useAutocomplete/useAutocomplete.d.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/pages/api/autocomplete.md b/docs/pages/api/autocomplete.md index 1ffa03c5ef1e6a..5890cc987842de 100644 --- a/docs/pages/api/autocomplete.md +++ b/docs/pages/api/autocomplete.md @@ -73,7 +73,7 @@ You can learn more about the difference by [reading this guide](/guides/minimizi | renderInput * | func | | Render the input.

**Signature:**
`function(params: object) => ReactNode`
*params:* null | | renderOption | func | | Render the option, use `getOptionLabel` by default.

**Signature:**
`function(option: T, state: object) => ReactNode`
*option:* The option to render.
*state:* The state of the component. | | renderTags | func | | Render the selected value.

**Signature:**
`function(value: undefined, getTagProps: function) => ReactNode`
*value:* The `value` provided to the component.
*getTagProps:* A tag props getter. | -| selectOnFocus | bool | !props.freeSolo | If `true`, the input's text will be selected on focus. It helps the user clearning the selected value. | +| selectOnFocus | bool | !props.freeSolo | If `true`, the input's text will be selected on focus. It helps the user clear the selected value. | | size | 'medium'
| 'small'
| 'medium' | The size of the autocomplete. | | value | any
| array
| | The value of the autocomplete.
The value must have reference equality with the option in order to be selected. You can customize the equality behavior with the `getOptionSelected` prop. | diff --git a/docs/src/pages/components/autocomplete/autocomplete.md b/docs/src/pages/components/autocomplete/autocomplete.md index 05a790f5dfabf0..6ec7d561ca090f 100644 --- a/docs/src/pages/components/autocomplete/autocomplete.md +++ b/docs/src/pages/components/autocomplete/autocomplete.md @@ -34,7 +34,7 @@ Choose one country between 248. Set `freeSolo` to true so the textbox can contain any arbitrary value. The prop is designed to cover the primary use case of a search box with suggestions, e.g. Google search. -However, if you intend to use it for a [combo box](#combo-box) like experience (an enhanced version of a select element) we recommend setting `selectOnFocus` (it helps the user clearning the selected value). +However, if you intend to use it for a [combo box](#combo-box) like experience (an enhanced version of a select element) we recommend setting `selectOnFocus` (it helps the user clear the selected value). {{"demo": "pages/components/autocomplete/FreeSolo.js"}} diff --git a/packages/material-ui-lab/src/Autocomplete/Autocomplete.js b/packages/material-ui-lab/src/Autocomplete/Autocomplete.js index ebfbd5226fffca..463ff0f2f7c529 100644 --- a/packages/material-ui-lab/src/Autocomplete/Autocomplete.js +++ b/packages/material-ui-lab/src/Autocomplete/Autocomplete.js @@ -745,7 +745,7 @@ Autocomplete.propTypes = { renderTags: PropTypes.func, /** * If `true`, the input's text will be selected on focus. - * It helps the user clearning the selected value. + * It helps the user clear the selected value. */ selectOnFocus: PropTypes.bool, /** diff --git a/packages/material-ui-lab/src/useAutocomplete/useAutocomplete.d.ts b/packages/material-ui-lab/src/useAutocomplete/useAutocomplete.d.ts index d25398ed1ba4d2..e616b2b1a94824 100644 --- a/packages/material-ui-lab/src/useAutocomplete/useAutocomplete.d.ts +++ b/packages/material-ui-lab/src/useAutocomplete/useAutocomplete.d.ts @@ -160,7 +160,7 @@ export interface UseAutocompleteCommonProps { options: T[]; /** * If `true`, the input's text will be selected on focus. - * It helps the user clearning the selected value. + * It helps the user clear the selected value. */ selectOnFocus?: boolean; }