I'm working with multiple Autocomplete MUI components and currently trying to write a "generic" event handler that will call useReducer hook to store the state.
The problem is that in Autocomplete docs, onChange function looks like the following:
function(event: object, value: T | T[], reason: string) => void
I'm trying to get the name of a field from the event object (to determine what Autocomplete is being changed), but event.target.name and event.currentTarget.name are not working.
Are there are any ways to retrieve the name of a component that was changed?