[material-ui][Autocomplete] onInputChange called with undefined event contrary to type definition #43899
Labels
component: autocomplete
This is the name of the generic UI component, not the React module!
package: material-ui
Specific to @mui/material
typescript
Steps to reproduce
Link to live example: (required) https://stackblitz.com/edit/react-ouzbqw?file=Demo.tsx
Steps:
Current behavior
Hello 👋
I'm noticing that the
onInputChange
is typed as:with a non-null
event
param, butnull
seems to be coming through for the param on mount. See demo:Expected behavior
I'm not sure if
onInputChange
is supposed to be called on mount or not, but if it is and it's expected thatnull
is an option forevent
, would it be possible to update the typing ofonInputChange
to reflect that?Thanks!
Context
We are trying to use strict null safety
Your environment
See https://stackblitz.com/edit/react-ouzbqw?file=Demo.tsx - also reproduce-able in this docs demo
Search keywords: onInputChange undefined event
The text was updated successfully, but these errors were encountered: