From 248d26df308b109589c4cf984b0c3000ac30c3b7 Mon Sep 17 00:00:00 2001 From: Florian Necas Date: Mon, 27 Nov 2023 13:32:44 +0100 Subject: [PATCH] fix: Update changedetection strategy to avoid undefinite calls to getters --- .../src/lib/components/wizard-field/wizard-field.component.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/feature/editor/src/lib/components/wizard-field/wizard-field.component.ts b/libs/feature/editor/src/lib/components/wizard-field/wizard-field.component.ts index 4863ee0645..cc945cbd37 100644 --- a/libs/feature/editor/src/lib/components/wizard-field/wizard-field.component.ts +++ b/libs/feature/editor/src/lib/components/wizard-field/wizard-field.component.ts @@ -1,5 +1,6 @@ import { AfterViewInit, + ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, @@ -67,6 +68,7 @@ export const MY_FORMATS = { }, { provide: MAT_DATE_FORMATS, useValue: MY_FORMATS }, ], + changeDetection: ChangeDetectionStrategy.OnPush, }) export class WizardFieldComponent implements AfterViewInit, OnDestroy { @Input() wizardFieldConfig: WizardFieldModel @@ -104,7 +106,6 @@ export class WizardFieldComponent implements AfterViewInit, OnDestroy { return data ? new Date(Number(data)) : new Date() } case WizardFieldType.DROPDOWN: { - //TODO called continuously return data ? JSON.parse(data) : this.dropdownChoices[0]?.value } }