Skip to content

Commit

Permalink
perf(core): improve initial build time (#3333)
Browse files Browse the repository at this point in the history
  • Loading branch information
aitboudad committed Jun 3, 2022
1 parent c7692d9 commit 8d8ac6c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/core/src/lib/services/formly.form.builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ export class FormlyFormBuilder {
}

const field = { fieldGroup, model, formControl, options: this._setOptions(options) };
disableTreeValidityCall(formControl, () => this._buildForm(field));
field.options._checkField(field, true);
disableTreeValidityCall(formControl, () => {
this._buildForm(field);
field.options._checkField(field, true);
});
}

private _buildForm(field: FormlyFieldConfigCache) {
Expand Down

0 comments on commit 8d8ac6c

Please sign in to comment.