From cadc51554acd753c80ed9c1ff87f31b47a4ad018 Mon Sep 17 00:00:00 2001 From: LiWeiYeh Date: Thu, 22 Dec 2022 16:09:03 +0100 Subject: [PATCH] remove unnecessary comment --- .../atomic-alphanumeric.component.ts | 22 +++++++++---------- .../atomic-bigalphanumeric.component.ts | 22 +++++++++---------- 2 files changed, 20 insertions(+), 24 deletions(-) diff --git a/src/app/shared/atomic-components/atomic-alphanumeric/atomic-alphanumeric.component.ts b/src/app/shared/atomic-components/atomic-alphanumeric/atomic-alphanumeric.component.ts index eee83da81..3ab131041 100644 --- a/src/app/shared/atomic-components/atomic-alphanumeric/atomic-alphanumeric.component.ts +++ b/src/app/shared/atomic-components/atomic-alphanumeric/atomic-alphanumeric.component.ts @@ -16,18 +16,16 @@ export class AtomicAlphanumericComponent extends BaseAtomicComponent imp super.ngOnInit(); this.formControl = new FormControl(this.data[0], { nonNullable: false, updateOn: 'blur' }); - this.formControl.valueChanges.subscribe( - (x) => - this.resource - .patch([ - { - op: 'replace', - path: this.propertyName, // FIXME: this must be relative to path of this.resource - value: x, - }, - ]) - .subscribe(), - // .subscribe(() => this.resource.data$.subscribe((x: any) => console.log(x))), + this.formControl.valueChanges.subscribe((x) => + this.resource + .patch([ + { + op: 'replace', + path: this.propertyName, // FIXME: this must be relative to path of this.resource + value: x, + }, + ]) + .subscribe(), ); } } diff --git a/src/app/shared/atomic-components/atomic-bigalphanumeric/atomic-bigalphanumeric.component.ts b/src/app/shared/atomic-components/atomic-bigalphanumeric/atomic-bigalphanumeric.component.ts index 696e9ed82..f5379fdbf 100644 --- a/src/app/shared/atomic-components/atomic-bigalphanumeric/atomic-bigalphanumeric.component.ts +++ b/src/app/shared/atomic-components/atomic-bigalphanumeric/atomic-bigalphanumeric.component.ts @@ -17,18 +17,16 @@ export class AtomicBigalphanumericComponent extends BaseAtomicComponent super.ngOnInit(); this.formControl = new FormControl(this.data[0], { nonNullable: false, updateOn: 'blur' }); - this.formControl.valueChanges.subscribe( - (x) => - this.resource - .patch([ - { - op: 'replace', - path: this.propertyName, // FIXME: this must be relative to path of this.resource - value: x, - }, - ]) - .subscribe(), - // .subscribe(() => this.resource.data$.subscribe((x: any) => console.log(x))), + this.formControl.valueChanges.subscribe((x) => + this.resource + .patch([ + { + op: 'replace', + path: this.propertyName, // FIXME: this must be relative to path of this.resource + value: x, + }, + ]) + .subscribe(), ); } }