Skip to content

Commit 61b6886

Browse files
fix(module:checkbox): fix NG0600 error (#9105)
1 parent 22e3bdf commit 61b6886

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

components/checkbox/checkbox-group.component.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ import {
1818
inject,
1919
input,
2020
linkedSignal,
21-
signal
21+
signal,
22+
untracked
2223
} from '@angular/core';
2324
import { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';
2425
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
@@ -112,7 +113,9 @@ export class NzCheckboxGroupComponent implements ControlValueAccessor {
112113
}
113114

114115
writeValue(value: Array<string | number> | null): void {
115-
this.value.set(value);
116+
untracked(() => {
117+
this.value.set(value);
118+
});
116119
}
117120

118121
registerOnChange(fn: OnChangeType): void {
@@ -124,7 +127,9 @@ export class NzCheckboxGroupComponent implements ControlValueAccessor {
124127
}
125128

126129
setDisabledState(disabled: boolean): void {
127-
this.finalDisabled.set((this.isDisabledFirstChange && this.nzDisabled()) || disabled);
130+
untracked(() => {
131+
this.finalDisabled.set((this.isDisabledFirstChange && this.nzDisabled()) || disabled);
132+
});
128133
this.isDisabledFirstChange = false;
129134
}
130135

0 commit comments

Comments
 (0)