From ec9f8cd5f1228e321b1c44aa0081c3c507278a8c Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Fri, 16 Dec 2022 17:04:31 -0500 Subject: [PATCH] fix(toggle): emitStyles only fires with legacy control (#26507) --- core/src/components/toggle/toggle.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/src/components/toggle/toggle.tsx b/core/src/components/toggle/toggle.tsx index 9ba04bbfd7..5c2cc41f72 100644 --- a/core/src/components/toggle/toggle.tsx +++ b/core/src/components/toggle/toggle.tsx @@ -190,9 +190,11 @@ export class Toggle implements ComponentInterface { } private emitStyle() { - this.ionStyle.emit({ - 'interactive-disabled': this.disabled, - }); + if (this.legacyFormController.hasLegacyControl()) { + this.ionStyle.emit({ + 'interactive-disabled': this.disabled, + }); + } } private onStart() {