Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Autocomplete] Update autoSelect prop description #36280

Merged
merged 7 commits into from
Mar 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/translations/api-docs/autocomplete/autocomplete.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"propDescriptions": {
"autoComplete": "If <code>true</code>, the portion of the selected suggestion that has not been typed by the user, known as the completion string, appears inline after the input cursor in the textbox. The inline completion string is visually highlighted and has a selected state.",
"autoHighlight": "If <code>true</code>, the first option is automatically highlighted.",
"autoSelect": "If <code>true</code>, the selected option becomes the value of the input when the Autocomplete loses focus unless the user chooses a different option or changes the character string in the input.",
"autoSelect": "If <code>true</code>, the selected option becomes the value of the input when the Autocomplete loses focus unless the user chooses a different option or changes the character string in the input.<br>When using <code>freeSolo</code> mode, the typed value will be the input value if the Autocomplete loses focus without highlighting an option.",
"blurOnSelect": "Control if the input should be blurred when an option is selected:<br>- <code>false</code> the input is not blurred. - <code>true</code> the input is always blurred. - <code>touch</code> the input is blurred after a touch event. - <code>mouse</code> the input is blurred after a mouse event.",
"ChipProps": "Props applied to the <a href=\"/material-ui/api/chip/\"><code>Chip</code></a> element.",
"classes": "Override or extend the styles applied to the component. See <a href=\"#css\">CSS API</a> below for more details.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"parametersDescriptions": {
"autoComplete": "If <code>true</code>, the portion of the selected suggestion that has not been typed by the user,\nknown as the completion string, appears inline after the input cursor in the textbox.\nThe inline completion string is visually highlighted and has a selected state.",
"autoHighlight": "If <code>true</code>, the first option is automatically highlighted.",
"autoSelect": "If <code>true</code>, the selected option becomes the value of the input\nwhen the Autocomplete loses focus unless the user chooses\na different option or changes the character string in the input.",
"autoSelect": "If <code>true</code>, the selected option becomes the value of the input\nwhen the Autocomplete loses focus unless the user chooses\na different option or changes the character string in the input.\n\nWhen using <code>freeSolo</code> mode, the typed value will be the input value\nif the Autocomplete loses focus without highlighting an option.",
"blurOnSelect": "Control if the input should be blurred when an option is selected:\n\n- <code>false</code> the input is not blurred.\n- <code>true</code> the input is always blurred.\n- <code>touch</code> the input is blurred after a touch event.\n- <code>mouse</code> the input is blurred after a mouse event.",
"clearOnBlur": "If <code>true</code>, the input's text is cleared on blur if no value is selected.\n\nSet to <code>true</code> if you want to help the user enter a new value.\nSet to <code>false</code> if you want to help the user resume their search.",
"clearOnEscape": "If <code>true</code>, clear all values when the user presses escape and the popup is closed.",
Expand Down
3 changes: 3 additions & 0 deletions packages/mui-base/src/useAutocomplete/useAutocomplete.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ export interface UseAutocompleteProps<
* If `true`, the selected option becomes the value of the input
* when the Autocomplete loses focus unless the user chooses
* a different option or changes the character string in the input.
*
* When using `freeSolo` mode, the typed value will be the input value
* if the Autocomplete loses focus without highlighting an option.
* @default false
*/
autoSelect?: boolean;
Expand Down
3 changes: 3 additions & 0 deletions packages/mui-material/src/Autocomplete/Autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,9 @@ Autocomplete.propTypes /* remove-proptypes */ = {
* If `true`, the selected option becomes the value of the input
* when the Autocomplete loses focus unless the user chooses
* a different option or changes the character string in the input.
*
* When using `freeSolo` mode, the typed value will be the input value
* if the Autocomplete loses focus without highlighting an option.
* @default false
*/
autoSelect: PropTypes.bool,
Expand Down