Closed iamalextodoran closed 3 years ago
If you haven't figured it out already, can you post a snippet of your code?
I've disabled the action on key press with useEffect, so far it's fine and seems to work well.
useEffect(() => {
const handleUserKeyPress = event => {
if (event.key === 'Enter') {
event.preventDefault();
}
};
window.addEventListener('keydown', handleUserKeyPress);'
return () => {
window.removeEventListener('keydown', handleUserKeyPress);
};
}, []);
When pressing the enter key the wizard gets to the next step and skips all my validations. I tried preventing the default, but didn't work.