You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello everyone.
I have a problem using ngbTypeahead in modal window, shown by BsModalService. On every typing inside ngbTypeahead <input> element my app sends http-request. The problem is that if i make a mouse click in modal window area ("modal-content") at the moment when request is sent, but answer is not got yet, then request canceles.
Hi, @MaximumRGB! We can’t reproduce the issue now in the latest version to check if it has been fixed or not. If you still can, please do it at https://stackblitz.com/edit/angular-ivy-de1elj?file=tsconfig.json/ and share with us, or please add a recorded video, or just send us steps to reproduce. Thank you for using our library).
Hello everyone.
I have a problem using ngbTypeahead in modal window, shown by BsModalService. On every typing inside ngbTypeahead
<input>
element my app sends http-request. The problem is that if i make a mouse click in modal window area ("modal-content") at the moment when request is sent, but answer is not got yet, then request canceles.template
<input>
element:<input type="text" class="form-control" formControlName="layer" #ownerSauid ="ngbTypeahead" [(ngModel)]="ngValue" [ngbTypeahead]="search" [resultFormatter]="formatResult" [inputFormatter]="formatMatches" (selectItem)="getDivisions($event)" (input)="clearDivisions()" required />
ngbTypeahead search:
search = (text$: Observable<string>) => text$.pipe( debounceTime(300), distinctUntilChanged(), tap(term => this.loading = !!term.length), switchMap(term => term.length > 0 ? this.layersService.getLayerByID(term).pipe( tap(data => this.searchFailed = false), catchError((error) => { this.searchFailed = true; this.loading = false; return observableOf([]); }) ) : []), tap(() => this.loading = false));
The text was updated successfully, but these errors were encountered: