validate field on touch

This commit is contained in:
Igor Hrenowitsch Propisnov 2024-08-22 13:29:23 +02:00
parent 68c21f3675
commit 235edd247c
1 changed files with 3 additions and 2 deletions

View File

@ -208,12 +208,13 @@ export class DropdownComponent implements ControlValueAccessor, Validator {
public onFocus(): void {
this.filteredItems.set(this.items());
this.markAsTouched();
}
public onBlur(): void {
if (!this.isMouseInDropdown) {
if (!this.isMouseInDropdown()) {
this.closeDropdown();
this.onTouched();
this.markAsTouched();
}
}