SyntaxFix
Write A Post
Hire A Developer
Questions
Adding onKeyPress will work onChange in Text Field.
<TextField onKeyPress={(ev) => { console.log(`Pressed keyCode ${ev.key}`); if (ev.key === 'Enter') { // Do code here ev.preventDefault(); } }} />