Listen to input changes?
Opened this issue · 2 comments
Deleted user commented
Is this listening for input changes? For example, changing size from "normal" to "compact"? Tried to do that dynamically and it didn't work.
// component view
<re-captcha
(captchaResponse)="handleCaptcha($event)"
size="{{captchaSize}}"
site_key="{{captchaSiteKey}}"></re-captcha>
// component class
@HostListener('window:resize', ['$event'])
onResize(event) {
if (event.target.innerWidth < 390) {
this.captchaSize = 'compact';
} else {
this.captchaSize = 'normal';
}
}
xmaestro commented
I don't think this behavior is supported through javascript in core captcha library.
Have you tried css? Perhaps something like this: https://stackoverflow.com/a/43728040/833811
xmaestro commented
Please reopen if this is still an issue for you.