I need to pass the index of the menu item selected onChange but don't know how to access it.
const handleListChange = (e) => {
console.log('Item Index: ', e.target.key);
}
<TextField
select
label="Select item"
value={show}
onFocus={getListArray}
onChange={e => handleListChange(e)}
>
{listArray.map((value, index) =>
<MenuItem
key={index}
value={value.title}
>
{value.title}
</MenuItem>
)}
</TextField>