iamguid / ngx-mf

Bind your model types to angular FormGroup type
MIT License
39 stars 2 forks source link

Updating from 3.x to 4.x #14

Closed thyco closed 2 weeks ago

thyco commented 1 month ago

Hello,

We're trying to update from 3.x to 4.x and as noted in the 4.0 release notes, the infer modes are removed. It states : InferModes has been removed - now fields optionality and nullability will be inferred from model and all form controls are required in inferred form type.

My question is: what does "now fields optionality and nullability will be inferred from model" mean? We use "?" in our model for optional fields, but this does not seem to work anymore.

How are we supposed to have optional fields now or is this no longer possible?

Thanks in advance.

iamguid commented 1 month ago

Hello, @thyco, thank you for your question

I think it is a bug, because if you define model as optional, it should be optional in inferred type too, so I'll fix it in next release.

Thank you!