I need to activate enter button after captcha verified but currently it's not working. It shows anchor:1 Uncaught (in promise) null
below is my whole code. I'm using https://www.npmjs.com/package/react-google-recaptcha
enterkey = event => {
console.log(event)
if (event.key === "Enter") {
this.submitHandler(event);
}
};
captchaValidate = (value) => {
this.enterkey();
console.log(value)
if (value) {
this.setState({ disabled: false })
} else {
this.setState({ disabled: true })
}
}
<ReCAPTCHA
sitekey={captcha_key}
onChange={this.captchaValidate}
className="g_capctha"
/>
I think problem is with event
because event is getting undefined when captchaValidate
called. How can I get event in this captchaValidate
because changing value to event it gives only some text similar like any token. Please help.