Browse Source

UI: Fixed save geofencing cf

pull/14841/head
ArtemDzhereleiko 9 months ago
committed by Vladyslav Prykhodko
parent
commit
4df0b38e64
  1. 2
      ui-ngx/src/app/core/services/calculated-field-form.service.ts

2
ui-ngx/src/app/core/services/calculated-field-form.service.ts

@ -71,7 +71,7 @@ export class CalculatedFieldFormService {
takeUntilDestroyed(destroyRef)
).subscribe(([prevType, nextType]) => {
const shouldCheck = isEditActive ? isEditActive() : true;
if (shouldCheck) {
if (shouldCheck && prevType !== nextType) {
if (![CalculatedFieldType.SIMPLE, CalculatedFieldType.SCRIPT].includes(prevType) ||
![CalculatedFieldType.SIMPLE, CalculatedFieldType.SCRIPT].includes(nextType)) {
form.get('configuration').setValue({} as CalculatedFieldConfiguration, { emitEvent: false });

Loading…
Cancel
Save