-
-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ControlsOf doesn't work with optional fields #111
Comments
I don't see any error in codesandbox |
I see one right here: https://codesandbox.io/s/form-ngneat-1v2hy?file=/src/app/app.component.ts:1003-1035 🤔 |
I see the error, but I don't know what's wrong with your sandbox. Would you please reproduce it in this repo? You can use the playground or in a plain spec file. Would you please keep it minimal? |
I think I found it. Someone told me that Another strange thing happens after I "fix" everything. I added a helper function "setDisabled" which can disable or enable a control, but Furthermore, I really hope this is a simple mistake of mine, but I struggle with it a few days now and really want it to work. Thanks for your time, Netanel! |
No problem. I'm closing this issue for now. |
Oh, I still think it's a bug because Created an even smaller example: https://codesandbox.io/s/quirky-feistel-oq9g7?file=/src/index.ts |
@muuvmuuv you can try the latest version. See the docs for the gotchas. |
@NetanelBasal that works, thanks :) |
Is this a regression?
Yes
Description
I am migrating our current form service to the latest version of this lib and encounter an issue with
strictNullChecks
.When I use
new FormGroup({} as ControlsOf<T>)
whereT
is a Model defined in a Component, it seems it cannot recognize it properly.I bet I am just missing something but since it is experimental, I thought it could also be a bug in
ControlOf
, I tried some different things without it, but nothing works 100%.I am willed to contribute, but atm I have no clue where to start really. Everything seems right, expect the part where it tries to type to an Observable (see error below).
Please provide a link to a minimal reproduction of the bug
https://codesandbox.io/s/form-ngneat-1v2hy?file=/src/app/app.component.ts
Please provide the exception or error you saw
Please provide the environment you discovered this bug in
No response
Anything else?
No response
Do you want to create a pull request?
Yes
The text was updated successfully, but these errors were encountered: