ngx-chips
ngx-chips copied to clipboard
Handling of multiple observables is buggy
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.
Hey Guys,
Do you have any updates regarding this issue?
We replaced ngx-chips and a couple other libraries with ng-select.
@rdicroce thanks for the response
The code should probably be using a switchMap, perhaps the same issue as: https://github.com/Gbuomprisco/ngx-chips/issues/908