Using ownerState
is undefined in styleOverrides
for Autocomplete
on opening the options
#43992
Labels
bug 🐛
Something doesn't work
component: autocomplete
This is the name of the generic UI component, not the React module!
regression
A bug, but worse
Steps to reproduce
Link to live example: CodeSandbox
Steps:
Autocomplete
component that makes use ofownerState
(reads one of its properties).Autocomplete
with that theme.Autocomplete
to open the list of options.Current behavior
The application crashes with the following error:
because the style override function is called without an
ownerState
(which should never happen).Expected behavior
ownerState
is always passed to the style override, the list of options opens without any issue.Context
I'm trying to restyle the component to match the company design system.
Your environment
npx @mui/envinfo
Tested on Chrome.
Search keywords: Autocomplete ownerState styleOverrides
The text was updated successfully, but these errors were encountered: