diff --git a/docs/pages/material-ui/api/autocomplete.json b/docs/pages/material-ui/api/autocomplete.json index cca686211fc219..5f479efabe3cb2 100644 --- a/docs/pages/material-ui/api/autocomplete.json +++ b/docs/pages/material-ui/api/autocomplete.json @@ -35,6 +35,7 @@ "disabled": { "type": { "name": "bool" }, "default": "false" }, "disabledItemsFocusable": { "type": { "name": "bool" }, "default": "false" }, "disableListWrap": { "type": { "name": "bool" }, "default": "false" }, + "disableOptionEqualToValueWarning": { "type": { "name": "bool" }, "default": "false" }, "disablePortal": { "type": { "name": "bool" }, "default": "false" }, "filterOptions": { "type": { "name": "func" } }, "filterSelectedOptions": { "type": { "name": "bool" }, "default": "false" }, diff --git a/docs/translations/api-docs/autocomplete/autocomplete.json b/docs/translations/api-docs/autocomplete/autocomplete.json index 7a2fe237d9a903..7ea1958730fe12 100644 --- a/docs/translations/api-docs/autocomplete/autocomplete.json +++ b/docs/translations/api-docs/autocomplete/autocomplete.json @@ -19,6 +19,7 @@ "disabled": "If true, the component is disabled.", "disabledItemsFocusable": "If true, will allow focus on disabled items.", "disableListWrap": "If true, the list box in the popup will not wrap focus.", + "disableOptionEqualToValueWarning": "Disable warning when options are not equal to value", "disablePortal": "If true, the Popper content will be under the DOM hierarchy of the parent component.", "filterOptions": "A function that determines the filtered options to be rendered on search.

Signature:
function(options: Array<T>, state: object) => Array<T>
options: The options to render.
state: The state of the component.", "filterSelectedOptions": "If true, hide the selected options from the list box.", diff --git a/packages/mui-joy/src/Autocomplete/Autocomplete.tsx b/packages/mui-joy/src/Autocomplete/Autocomplete.tsx index 7540ab1c62905b..08e856941b35df 100644 --- a/packages/mui-joy/src/Autocomplete/Autocomplete.tsx +++ b/packages/mui-joy/src/Autocomplete/Autocomplete.tsx @@ -261,6 +261,7 @@ const excludeUseAutocompleteParams = < disableCloseOnSelect, disabledItemsFocusable, disableListWrap, + disableOptionEqualToValueWarning, filterSelectedOptions, handleHomeEndKeys, includeInputInList, diff --git a/packages/mui-material/src/Autocomplete/Autocomplete.js b/packages/mui-material/src/Autocomplete/Autocomplete.js index 19e2615989e707..46d8cda5c25648 100644 --- a/packages/mui-material/src/Autocomplete/Autocomplete.js +++ b/packages/mui-material/src/Autocomplete/Autocomplete.js @@ -398,6 +398,7 @@ const Autocomplete = React.forwardRef(function Autocomplete(inProps, ref) { disabled = false, disabledItemsFocusable = false, disableListWrap = false, + disableOptionEqualToValueWarning = false, disablePortal = false, filterOptions, filterSelectedOptions = false, @@ -807,6 +808,11 @@ Autocomplete.propTypes /* remove-proptypes */ = { * @default false */ disableListWrap: PropTypes.bool, + /** + * Disable warning when options are not equal to value + * @default false + */ + disableOptionEqualToValueWarning: PropTypes.bool, /** * If `true`, the `Popper` content will be under the DOM hierarchy of the parent component. * @default false