[material-ui][Autocomplete] onHighlightChange called when listbox opens without any option being highlighted #43213
Labels
bug 🐛
Something doesn't work
component: autocomplete
This is the name of the generic UI component, not the React module!
package: material-ui
Specific to @mui/material
Steps to reproduce
Link to live example: https://stackblitz.com/edit/react-d4b5ls?file=Demo.tsx
Steps:
onHighlightChange
propevent
paramCurrent behavior
Hello 👋
I'm noticing that the
onHighlightChange
is typed as:with a non-null
event
param, butundefined
seems to be coming through for the param. See demo:Expected behavior
Would it be possible to change the typing of the prop to reflect the values that are being passed to
event
?This seems like it would be consistent with some other onHighlightChange props.
Context
We are trying to use strict null safety
Your environment
See codesandbox link
Search keywords: onHighlightChange, undefined event
The text was updated successfully, but these errors were encountered: