I want to move to the next field in a form when key enter is pressed. I tried putting onKeyPress in the element's props, in the prop inputProps and in MenuProps but it didn't work. The menu to choose an option keeps opening. Is there any way to do this?
<FormControl variant="outlined" className={classes.formControl}>
<InputLabel id="demo-simple-select-outlined-label">Age</InputLabel>
<Select
{...props}
onKeyPress={(e) => console.log(e.key)}
>
{...menuItems}
</Select>
</FormControl>