From ce9443be1c4debbec649930000feba78b98e1201 Mon Sep 17 00:00:00 2001 From: "hamza.hramchi" <hamza.hramchi@xelians.fr> Date: Tue, 6 Apr 2021 16:00:22 +0200 Subject: [PATCH] FIX #16648 TIME 0:04 fix js error when clicking on the search field next to document numbers --- src/frontend/app/sidebar/sidebar.component.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/frontend/app/sidebar/sidebar.component.ts b/src/frontend/app/sidebar/sidebar.component.ts index 99e83eeff6..d52d797ba7 100755 --- a/src/frontend/app/sidebar/sidebar.component.ts +++ b/src/frontend/app/sidebar/sidebar.component.ts @@ -6,7 +6,7 @@ import { NotificationService } from '../service/notification.service'; import { FormControl } from '@angular/forms'; import { debounceTime, switchMap, distinctUntilChanged, tap, finalize, elementAt } from 'rxjs/operators'; import { AuthService } from '../service/auth.service'; -import { MenuController, ModalController } from '@ionic/angular'; +import { IonSearchbar, MenuController, ModalController } from '@ionic/angular'; import { ProfileComponent } from '../profile/profile.component'; import { FunctionsService } from '../service/functions.service'; import { FiltersService } from '../service/filters.service'; @@ -22,7 +22,7 @@ import { ActionsService } from '../service/actions.service'; export class SidebarComponent implements OnInit, AfterViewInit { @ViewChild('listContent') listContent: ElementRef; - @ViewChild('searchInput') searchInput: ElementRef; + @ViewChild('searchInput') searchInput: IonSearchbar; subscription: Subscription; @@ -107,9 +107,8 @@ export class SidebarComponent implements OnInit, AfterViewInit { this.signaturesService.mode = ''; this.filter(''); setTimeout(() => { - this.searchInput.nativeElement.value = ''; - this.searchInput.nativeElement.focus(); - this.searchInput.nativeElement.click(); + this.searchInput.value = ''; + this.searchInput.setFocus(); }, 0); } -- GitLab