From 2f4a015c532a180e1f4b8fa3c7ba0451afd46ea4 Mon Sep 17 00:00:00 2001 From: tmdeveloper007 Date: Mon, 27 Jul 2026 20:06:16 +0000 Subject: [PATCH] fix: subscribe handleKey to events in CheckboxGroup constructor --- packages/ui/src/CheckboxGroup.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/ui/src/CheckboxGroup.ts b/packages/ui/src/CheckboxGroup.ts index c63b464a3..0f99f1456 100644 --- a/packages/ui/src/CheckboxGroup.ts +++ b/packages/ui/src/CheckboxGroup.ts @@ -42,6 +42,13 @@ export class CheckboxGroup extends Widget { (options.defaultValues ?? []).filter(v => knownValues.has(v)), ); this.onChange = options.onChange; + this.events.on('key', this.handleKey); + } + + override mount(): void { + super.mount(); + this.events.off('key', this.handleKey); + this.events.on('key', this.handleKey); } get selectedValues(): string[] {