ngx-chips icon indicating copy to clipboard operation
ngx-chips copied to clipboard

Handling of multiple observables is buggy

Open rdicroce opened this issue 7 years ago • 4 comments

I'm submitting a ... (check one with "x")

[x] bug report => search github for a similar issue or PR before submitting
[ ] support request/question

Notice: feature requests will be ignored, submit a PR if you'd like

Current behavior When using autocompleteObservable with a remote source that has a delay, the loading bar is buggy. Sometimes multiple bars show up, and sometimes the loading animation continues even after loading is complete.

Expected behavior There should be only 1 loading bar, and the animation should terminate when loading is complete.

Minimal reproduction of the problem with instructions (if applicable) You can reproduce this using the demo app, if GitHub is slow enough to respond. Scroll down to "Tags accepting only items from an autocomplete using a remote endpoint". Type a letter and wait for the request to be started, then quickly type another letter before the request completes. This seems to trigger a 2nd request, which is to be expected, but ngx-chips doesn't seem to forget about the first request. IMO it should, because the last request is the only useful one.

What do you use to build your app?. Please specify the version Whatever the demo app is using.

Angular version: Whatever the demo app is using.

ngx-chips version: Whatever the demo app is using.

Browser: Reproduced in Firefox 63.0.1 and Chrome 70.0.3538.102, but presumably happens in all browsers.

rdicroce avatar Nov 13 '18 15:11 rdicroce

Hey Guys,

Do you have any updates regarding this issue?

Zabudska-Yuliia avatar May 06 '19 11:05 Zabudska-Yuliia

We replaced ngx-chips and a couple other libraries with ng-select.

rdicroce avatar May 06 '19 15:05 rdicroce

@rdicroce thanks for the response

Zabudska-Yuliia avatar May 06 '19 15:05 Zabudska-Yuliia

The code should probably be using a switchMap, perhaps the same issue as: https://github.com/Gbuomprisco/ngx-chips/issues/908

KevinABoucher avatar Oct 24 '19 17:10 KevinABoucher