Closed Yohandah closed 1 year ago
@makar-l @waterplea I ping you because I'm not sure you keep an eye on this library. Is it still supported ?
Hello Yohandah! Sorry for leaving you without attention. I will fix it, thank you
Hello @Yohandah
I've checked your case. This error is form ngrx-forms itself, not from the adapter.
But for me it looks logical, that undefined control state is an invalid case. If you are using the "!", I guess, it's invalid for your case too. So I think you need to correct your types or check nullable via "ngIf".
Thank you for paying attention to my small lib. Wish you a good day :)
š Bug report
Description
The directive should allow for
FormControlState<string | undefined>
Reproduction
const initialFormState: FormGroupState = createFormGroupState(
'myForm',
{
myProp: undefined,
}
)
<form *ngIf="myForm$ | async as myForm" [ngrxFormState]="myForm"> <tui-select [ngrxFormControlState]="myForm.controls.myProp">
error TS2322: Type 'FormControlState<string | undefined> | undefined' is not assignable to type 'AbstractControlState'.'.
Type 'undefined' is not assignable to type 'AbstractControlState
22 [ngrxFormControlState]="myForm.controls.project"