Skip to content

Commit

Permalink
fix: Update changedetection strategy to avoid undefinite calls to get…
Browse files Browse the repository at this point in the history
…ters
  • Loading branch information
f-necas committed Nov 27, 2023
1 parent 2c8f0b8 commit 248d26d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {
AfterViewInit,
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
Input,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
}
}
Expand Down

0 comments on commit 248d26d

Please sign in to comment.