Skip to content

Commit

Permalink
fix(cdk): Control fix initial status (#9539)
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimirpotekhin authored Oct 18, 2024
1 parent 049b289 commit cb5f29a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
6 changes: 5 additions & 1 deletion projects/cdk/classes/control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ export abstract class TuiControl<T> implements ControlValueAccessor {
filter(Boolean),
distinctUntilChanged(),
switchMap((c) =>
merge(c.valueChanges, c.statusChanges, (c as any).events || EMPTY),
merge(
c.valueChanges,
c.statusChanges,
(c as any).events || EMPTY,
).pipe(startWith(null)),
),
takeUntilDestroyed(),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
</span>
</ng-template>
<hr class="tui-space_vertical-4" />
<tui-radio-list
formControlName="disabled"
[items]="strings"
/>
<hr class="tui-space_vertical-4" />
</form>
<tui-radio-list
size="s"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {TuiRadioList} from '@taiga-ui/kit';
export default class Example {
protected readonly form = new FormGroup({
vertical: new FormControl(null, Validators.required),
disabled: new FormControl({value: null, disabled: true}),
});

protected readonly objects = [
Expand Down

0 comments on commit cb5f29a

Please sign in to comment.