diff --git a/libs/components/forms/src/lib/modules/checkbox/checkbox-change.ts b/libs/components/forms/src/lib/modules/checkbox/checkbox-change.ts index b81554c2b2..84c65a4329 100644 --- a/libs/components/forms/src/lib/modules/checkbox/checkbox-change.ts +++ b/libs/components/forms/src/lib/modules/checkbox/checkbox-change.ts @@ -4,7 +4,7 @@ import { SkyCheckboxComponent } from './checkbox.component'; /** * Fires when users select or deselect the checkbox. */ -export class SkyCheckboxChange { - public source: SkyCheckboxComponent | undefined; - public checked: boolean | undefined; +export interface SkyCheckboxChange { + source: SkyCheckboxComponent | undefined; + checked: boolean | undefined; } diff --git a/libs/components/forms/src/lib/modules/checkbox/checkbox.component.ts b/libs/components/forms/src/lib/modules/checkbox/checkbox.component.ts index 61cfcb5b8e..8cd96e1ab0 100644 --- a/libs/components/forms/src/lib/modules/checkbox/checkbox.component.ts +++ b/libs/components/forms/src/lib/modules/checkbox/checkbox.component.ts @@ -304,9 +304,7 @@ export class SkyCheckboxComponent implements ControlValueAccessor, OnInit { #controlValueAccessorChangeFn: (value: any) => void = (value) => {}; #emitChangeEvent(): void { - const event = new SkyCheckboxChange(); - event.source = this; - event.checked = this.#_checked; + const event: SkyCheckboxChange = { source: this, checked: this.#_checked }; this.#controlValueAccessorChangeFn(this.#_checked); this.change.emit(event); diff --git a/libs/components/list-builder-view-checklist/src/lib/modules/list-view-checklist/fixtures/list-view-checklist-toolbar.component.fixture.ts b/libs/components/list-builder-view-checklist/src/lib/modules/list-view-checklist/fixtures/list-view-checklist-toolbar.component.fixture.ts index 749ff5fe82..2928ccaebc 100644 --- a/libs/components/list-builder-view-checklist/src/lib/modules/list-view-checklist/fixtures/list-view-checklist-toolbar.component.fixture.ts +++ b/libs/components/list-builder-view-checklist/src/lib/modules/list-view-checklist/fixtures/list-view-checklist-toolbar.component.fixture.ts @@ -32,7 +32,7 @@ export class ListViewChecklistToolbarTestComponent { } public changeVisibleItems(checked: boolean): void { - const checkbox = new SkyCheckboxChange(); + const checkbox = { checked } as SkyCheckboxChange; checkbox.checked = checked; this.checklist.changeVisibleItems(checkbox); }