From b65ad23aaa3ed5ece6242c2b3b569322d275e93e Mon Sep 17 00:00:00 2001 From: Dan Percic Date: Wed, 26 Jan 2022 18:36:19 +0200 Subject: [PATCH] use relative import in common-ui --- src/lib/form/base-form.component.ts | 7 +------ src/lib/utils/functions.ts | 1 - 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/lib/form/base-form.component.ts b/src/lib/form/base-form.component.ts index c93d71a..72eae14 100644 --- a/src/lib/form/base-form.component.ts +++ b/src/lib/form/base-form.component.ts @@ -1,17 +1,12 @@ import { Directive } from '@angular/core'; import { FormGroup } from '@angular/forms'; -import { AutoUnsubscribe, hasFormChanged } from '@iqser/common-ui'; +import { AutoUnsubscribe, hasFormChanged } from '../utils'; @Directive() export abstract class BaseFormComponent extends AutoUnsubscribe { - form!: FormGroup; initialFormValue; - constructor() { - super(); - } - get changed(): boolean { return hasFormChanged(this.form, this.initialFormValue); } diff --git a/src/lib/utils/functions.ts b/src/lib/utils/functions.ts index 3ec2643..609e932 100644 --- a/src/lib/utils/functions.ts +++ b/src/lib/utils/functions.ts @@ -37,7 +37,6 @@ export function trackByFactory() { } export function hasFormChanged(form: FormGroup, initialFormValue): boolean { - if (form && initialFormValue) { for (const key of Object.keys(form.getRawValue())) { const initialValue = initialFormValue[key];