diff --git a/CHANGELOG.md b/CHANGELOG.md index 684bc7c..aa30e90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +# 8.5.10 (2024-11-22) + +[df18456]: https://github.com/erqk/ng-dynamic-json-form/commit/df184563cd7880c5ab5acc3a95916285ac5c4ed3 + +| Commit | Type | Description | +| --------- | ---- | -------------------------------------------- | +| [df18456] | fix | Control directive should also keep pristine. | + # 8.5.9 (2024-11-15) [78f28a0]: https://github.com/erqk/ng-dynamic-json-form/commit/78f28a0942c70398349645bf3aa394ba2afa393b diff --git a/lib/core/ng-dynamic-json-form.component.ts b/lib/core/ng-dynamic-json-form.component.ts index 2763f38..1af871f 100644 --- a/lib/core/ng-dynamic-json-form.component.ts +++ b/lib/core/ng-dynamic-json-form.component.ts @@ -461,6 +461,7 @@ export class NgDynamicJsonFormComponent const keepFormPristine = () => { if (this._allowFormDirty) return; this._updateFormStatus('setPristine'); + this._controlDirective?.control.markAsPristine(); }; // `setErrors()` must be called before `updateValue()`, diff --git a/lib/package.json b/lib/package.json index c128544..1dab15f 100644 --- a/lib/package.json +++ b/lib/package.json @@ -1,6 +1,6 @@ { "name": "ng-dynamic-json-form", - "version": "8.5.9", + "version": "8.5.10", "author": { "name": "erqk", "url": "https://github.com/erqk"