Browse Source

UI: Improvement processing variable tag

pull/4959/head
Vladyslav 5 years ago
committed by GitHub
parent
commit
7121fbf8c3
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      ui-ngx/src/app/modules/home/pages/ota-update/ota-update.component.ts

9
ui-ngx/src/app/modules/home/pages/ota-update/ota-update.component.ts

@ -73,16 +73,13 @@ export class OtaUpdateComponent extends EntityComponent<OtaPackage> implements O
}
});
combineLatest([
this.entityForm.get('title').valueChanges.pipe(startWith(''), takeUntil(this.destroy$)),
this.entityForm.get('version').valueChanges.pipe(startWith(''), takeUntil(this.destroy$))
this.entityForm.get('title').valueChanges.pipe(startWith('')),
this.entityForm.get('version').valueChanges.pipe(startWith(''))
]).pipe(
filter(() => this.entityForm.get('tag').pristine),
takeUntil(this.destroy$)
).subscribe(([title, version]) => {
let tag = `${title} ${version}`.trim();
if (tag === '') {
tag = '';
}
const tag = (`${title} ${version}`).trim();
this.entityForm.get('tag').patchValue(tag);
});
}

Loading…
Cancel
Save