* Props applied to the [`Chip`](/material-ui/api/chip/) element.
*/
ChipProps: PropTypes.object,
/**
* Override or extend the styles applied to the component.
*/
classes: PropTypes.object,
/**
* @ignore
*/
className: PropTypes.string,
/**
* The icon to display in place of the default clear icon.
* @default <ClearIcon fontSize="small" />
*/
clearIcon: PropTypes.node,
/**
* If `true`, the input's text is cleared on blur if no value is selected.
*
* Set to `true` if you want to help the user enter a new value.
* Set to `false` if you want to help the user resume their search.
* @default !props.freeSolo
*/
clearOnBlur: PropTypes.bool,
/**
* If `true`, clear all values when the user presses escape and the popup is closed.
* @default false
*/
clearOnEscape: PropTypes.bool,
/**
* Override the default text for the *clear* icon button.
*
* For localization purposes, you can use the provided [translations](/material-ui/guides/localization/).
* @default 'Clear'
*/
clearText: PropTypes.string,
/**
* Override the default text for the *close popup* icon button.
*
* For localization purposes, you can use the provided [translations](/material-ui/guides/localization/).
* @default 'Close'
*/
closeText: PropTypes.string,
/**
* The props used for each slot inside.
* @default {}
*/
componentsProps: PropTypes.shape({
clearIndicator: PropTypes.object,
paper: PropTypes.object,
popper: PropTypes.object,
popupIndicator: PropTypes.object
}),
/**
* The default value. Use when the component is not controlled.
* @default props.multiple ? [] : null
*/
defaultValue: chainPropTypes(PropTypes.any, function (props) {
if (props.multiple && props.defaultValue !== undefined && !Array.isArray(props.defaultValue)) {
return new Error(['MUI: The Autocomplete expects the `defaultValue` prop to be an array when `multiple={true}` or undefined.', "However, ".concat(props.defaultValue, " was provided.")].join('\n'));
}
return null;
}),
/**
* If `true`, the input can't be cleared.
* @default false
*/
disableClearable: PropTypes.bool,
/**
* If `true`, the popup won't close when a value is selected.
* @default false
*/
disableCloseOnSelect: PropTypes.bool,
/**
* If `true`, the component is disabled.
* @default false
*/
disabled: PropTypes.bool,
/**
* If `true`, will allow focus on disabled items.
* @default false
*/
disabledItemsFocusable: PropTypes.bool,
/**
* If `true`, the list box in the popup will not wrap focus.
* @default false
*/
disableListWrap: PropTypes.bool,
/**
* If `true`, the `Popper` content will be under the DOM hierarchy of the parent component.
* @default false
*/
disablePortal: PropTypes.bool,
/**
* A function that determines the filtered options to be rendered on search.
*
* @param {T[]} options The options to render.
* @param {object} state The state of the component.
* @returns {T[]}
*/
filterOptions: PropTypes.func,
/**
* If `true`, hide the selected options from the list box.
* The value must have reference equality with the option in order to be selected.
* You can customize the equality behavior with the `isOptionEqualToValue` prop.
*/
value: chainPropTypes(PropTypes.any, function (props) {
if (props.multiple && props.value !== undefined && !Array.isArray(props.value)) {
return new Error(['MUI: The Autocomplete expects the `value` prop to be an array when `multiple={true}` or undefined.', "However, ".concat(props.value, " was provided.")].join('\n'));