RED-6973: Fixed click issue.
This commit is contained in:
parent
bc28a75cf2
commit
487ca31c83
@ -1,5 +1,10 @@
|
||||
<ng-container *ngIf="configService.listingMode$ | async as mode">
|
||||
<div (click)="editFileAttribute($event)" [ngClass]="{ 'workflow-attribute': mode === 'workflow' }" class="file-attribute">
|
||||
<div
|
||||
(mousedown)="handleClick($event)"
|
||||
(click)="editFileAttribute($event)"
|
||||
[ngClass]="{ 'workflow-attribute': mode === 'workflow' }"
|
||||
class="file-attribute"
|
||||
>
|
||||
<div [ngClass]="{ 'workflow-value': mode === 'workflow' }" class="value">
|
||||
<b *ngIf="mode === 'workflow' && !isInEditMode"> {{ fileAttribute.label }}: </b>
|
||||
<span
|
||||
|
||||
@ -78,6 +78,10 @@ export class FileAttributeComponent extends BaseFormComponent implements OnDestr
|
||||
}
|
||||
}
|
||||
|
||||
handleClick($event: MouseEvent) {
|
||||
$event.stopPropagation();
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
this.#subscriptions.unsubscribe();
|
||||
}
|
||||
@ -157,7 +161,10 @@ export class FileAttributeComponent extends BaseFormComponent implements OnDestr
|
||||
});
|
||||
return this._formBuilder.group(config, {
|
||||
validators: control =>
|
||||
!control.get(this.fileAttribute.id).value?.trim().length && !this.fileAttributeValue ? { emptyString: true } : null,
|
||||
(!control.get(this.fileAttribute.id)?.value?.trim().length && !this.fileAttributeValue) ||
|
||||
control.get(this.fileAttribute.id)?.value === this.fileAttributeValue
|
||||
? { emptyString: true }
|
||||
: null,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user