Browse Source
UI: Improvement processing variable tag
pull/4959/head
Vladyslav
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
6 deletions
-
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); |
|
|
|
}); |
|
|
|
} |
|
|
|
|