Below steps:

  • e.key === ‘Enter’ or e.key === ’13
  • _handleKeyPress = (e) => {
    if (e.key === ‘Enter’) {
    firstName.blur()
    this.handleSignUpClick ()
    }
    }
  • handleSignUpClick (){ }
  • <TextBox name=”firstName” />
  • <Button onClick={this.handleSignUpClick} >

 

 

 

Advertisements