diff --git a/docs/pages/api/autocomplete.md b/docs/pages/api/autocomplete.md index d5a96d3226c1d4..a2f745bc11bcfc 100644 --- a/docs/pages/api/autocomplete.md +++ b/docs/pages/api/autocomplete.md @@ -52,6 +52,7 @@ You can learn more about the difference by [reading this guide](/guides/minimizi | includeInputInList | bool | false | If `true`, the highlight can move to the input. | | inputValue | string | | The input value. | | ListboxComponent | elementType | 'ul' | The component used to render the listbox. | +| ListboxProps | object | | Props applied to the Listbox element. | | loading | bool | false | If `true`, the component is in a loading state. | | loadingText | node | 'Loading…' | Text to display when in a loading state.
For localization purposes, you can use the provided [translations](/guides/localization/). | | multiple | bool | false | If `true`, `value` must be an array and the menu will support multiple selections. | diff --git a/packages/material-ui-lab/src/Autocomplete/Autocomplete.d.ts b/packages/material-ui-lab/src/Autocomplete/Autocomplete.d.ts index 39cf759bc82fd8..c579cd4ecf8c3e 100644 --- a/packages/material-ui-lab/src/Autocomplete/Autocomplete.d.ts +++ b/packages/material-ui-lab/src/Autocomplete/Autocomplete.d.ts @@ -66,6 +66,10 @@ export interface AutocompleteProps * The component used to render the listbox. */ ListboxComponent?: React.ComponentType>; + /** + * Props applied to the Listbox element. + */ + ListboxProps?: object; /** * If `true`, the component is in a loading state. */ diff --git a/packages/material-ui-lab/src/Autocomplete/Autocomplete.js b/packages/material-ui-lab/src/Autocomplete/Autocomplete.js index 7cc9b57f29c2a9..935f7bf5c4db85 100644 --- a/packages/material-ui-lab/src/Autocomplete/Autocomplete.js +++ b/packages/material-ui-lab/src/Autocomplete/Autocomplete.js @@ -244,6 +244,7 @@ const Autocomplete = React.forwardRef(function Autocomplete(props, ref) { includeInputInList = false, inputValue: inputValueProp, ListboxComponent = 'ul', + ListboxProps, loading = false, loadingText = 'Loading…', multiple = false, @@ -588,6 +589,10 @@ Autocomplete.propTypes = { * The component used to render the listbox. */ ListboxComponent: PropTypes.elementType, + /** + * Props applied to the Listbox element. + */ + ListboxProps: PropTypes.object, /** * If `true`, the component is in a loading state. */