hamzahamidi / ajsf

Angular JSON Schema Form
https://hamzahamidi.github.io/ajsf
MIT License
362 stars 183 forks source link

Angular 13 support #316

Open UncleSamSwiss opened 2 years ago

UncleSamSwiss commented 2 years ago

Currently ajsf only supports Angular 12. I just started a new application with Angular 13 and wanted to use ajsf. Now my questions:

KapilJeavio commented 2 years ago

Hi There, Recently we have migrated our angular app from Angular 9 to Angular 13. Along with that, we upgraded the JSON Schema Form packages @ajsf/core and @ajsf/material to 0.7.0.

Post that I observed a couple of issues and more or less all are similar to one thing and that is the form keeps on firing the onChanges event.

I checked a bit deeper and found something wrong with the model binding with the form, If I remove that binding it works as expected but at the time saving I am unable to get the form data.

Please refer to my form binding as follows:

<json-schema-form #jsfrm [schema]="schema" [form]="form" [(data)]="model" ngDefaultControl
            framework="material-design" [options]="formOptions">

Here, when I remove [(data)]="model" it works and does not call the onChanges infinitely but on submitting, the form group does not have values.

Any help on this will be appreciated. Thank you.