use relative import in common-ui
This commit is contained in:
parent
7c9c00eae9
commit
b65ad23aaa
@ -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);
|
||||
}
|
||||
|
||||
@ -37,7 +37,6 @@ export function trackByFactory<T extends ITrackable>() {
|
||||
}
|
||||
|
||||
export function hasFormChanged(form: FormGroup, initialFormValue): boolean {
|
||||
|
||||
if (form && initialFormValue) {
|
||||
for (const key of Object.keys(form.getRawValue())) {
|
||||
const initialValue = initialFormValue[key];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user