hideBadge and showBadge methods do not exist
The README indicates that there should be methods called hideBadge and showBadge:
But when I try to do this.$recaptchaInstance.showBadge() inside my component, I can an error that says the methods do not exist. I can't see them defined anywhere in this repo; maybe it's a remnant of old code?
Thanks for reporting this issue!
To access the actual reCAPTCHA instance, you need to use it like this: this.$recaptchaInstance.value.hideBadge()
That's because it's a Ref.
I'll update the README asap.
edit: i found way to showBadge() n hideBadge() inside setup() method, but make sure reCaptcha has been loaded.
setup(){
const { instance} = useReCaptcha();
instance.value.showBadge();
instance.value.hideBadge();
}
original answer :
Thanks for reporting this issue!
To access the actual reCAPTCHA instance, you need to use it like this:
this.$recaptchaInstance.value.hideBadge()That's because it's aRef.I'll update the README asap.
how to access that inside setup() method ?