RED-10512: fixed file attribute text selection.

This commit is contained in:
Nicoleta Panaghiu 2024-12-07 11:59:51 +02:00
parent 2fe21f0481
commit db7d1f24f5

View File

@ -1,4 +1,4 @@
import { AsyncPipe, NgClass, NgIf, NgTemplateOutlet } from '@angular/common'; import { AsyncPipe, NgClass, NgIf } from '@angular/common';
import { Component, computed, effect, HostListener, input, Input, OnDestroy } from '@angular/core'; import { Component, computed, effect, HostListener, input, Input, OnDestroy } from '@angular/core';
import { AbstractControl, FormBuilder, FormsModule, ReactiveFormsModule, UntypedFormGroup, ValidatorFn } from '@angular/forms'; import { AbstractControl, FormBuilder, FormsModule, ReactiveFormsModule, UntypedFormGroup, ValidatorFn } from '@angular/forms';
import { MatIconModule } from '@angular/material/icon'; import { MatIconModule } from '@angular/material/icon';
@ -42,7 +42,6 @@ import { ConfigService } from '../../config.service';
ReactiveFormsModule, ReactiveFormsModule,
DynamicInputComponent, DynamicInputComponent,
CircleButtonComponent, CircleButtonComponent,
NgTemplateOutlet,
TranslateModule, TranslateModule,
StopPropagationDirective, StopPropagationDirective,
], ],
@ -91,14 +90,11 @@ export class FileAttributeComponent extends BaseFormComponent implements OnDestr
); );
this.#subscriptions.add(sub2.subscribe()); this.#subscriptions.add(sub2.subscribe());
effect( effect(() => {
() => { if (this.#shouldClose()) {
if (this.#shouldClose()) { this.close();
this.close(); }
} });
},
{ allowSignalWrites: true },
);
} }
get isDate(): boolean { get isDate(): boolean {
@ -132,7 +128,6 @@ export class FileAttributeComponent extends BaseFormComponent implements OnDestr
handleClick($event: MouseEvent) { handleClick($event: MouseEvent) {
$event.stopPropagation(); $event.stopPropagation();
$event.preventDefault();
} }
ngOnDestroy() { ngOnDestroy() {