Ngx-bootstrap: Typeahead async with delay does not work consistently

Created on 28 Jan 2020  路  4Comments  路  Source: valor-software/ngx-bootstrap

Bug description:
After upgrading from version 5.1.1 to 5.3.2, typeahead is not consistently showing the suggestions.
I have an async typeahead with a typeaheadWaitMs of 500. If I start typing something and also remove some letters of what I type, sometimes no option is shown. If I than click arrow down key the list is shown.
I could only reproduce this issue when using typeaheadWaitMs.

Plunker/StackBlitz that reproduces the issue:
https://stackblitz.com/edit/angular-1wvdhr?file=src%2Fapp%2Fapp.component.html
Steps:

  1. Type "a";
  2. See that no list is shown;
  3. Press arrow down key;
  4. See that the list is now shown.

ngx-bootstrap: 5.3.2

Angular: 8.2.14

Expected behavior
I expect to always show the suggestion list when there is something to show.

comp(typeahead) issue

All 4 comments

@tiagowanke Hi! This issue will be fixed by the PR, which is in release 5.5.0.
https://github.com/valor-software/ngx-bootstrap/pull/3728

yeah, @tiagowanke , 5.5.0 is available right now :)

@tiagowanke Also could please pay attention to that code, which you used in your component to filter the data source? It's not necessary right now.
.pipe( mergeMap((token: string) => this.getStatesAsObservable(token)) );

You can check updated demo for async typeahead
https://valor-software.com/ngx-bootstrap/#/typeahead#async-data

Thanks everyone and congrats for the great work!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

haisaco picture haisaco  路  3Comments

ravirajhalli picture ravirajhalli  路  3Comments

KimBum picture KimBum  路  3Comments

pgeyman picture pgeyman  路  3Comments

tpiros picture tpiros  路  3Comments