jrquick17 / ionic4-auto-complete

An auto complete compatible with Ionic 2+ and Angular 2+.
https://ionic4-auto-complete.jrquick.com
MIT License
49 stars 36 forks source link

RXJS subscriptions not always cleared #121

Open waratah opened 2 years ago

waratah commented 2 years ago

I'm submitting a

Description

RXJS will keep sending updates until it is completed. I use this over a list that constantly pushes updates and the autocomplete itself keeps coming and going. This leaves a number of these subscriptions open consuming memory and processing useless code on the update of the initial list.

I have implemented a work around by using take(1) on my subscription however this bug is not obvious. I only found it as a result of looking at the code. There is also a slight possibility that the wrong list could be displayed, I never saw it happen however.

This also introduces a lookup when the list is cleared. Our testers considered it an error that I entered part of the values then the list just disappeared entirely. This is a breaking change as the results are different from the previous version.

Version Information

ionic4-auto-complete: 2.9.9
@angular/cli: 10.0.2

Browser


NOTE: Replace x.x.x with your version information

waratah commented 2 years ago

https://github.com/jrquick17/ionic4-auto-complete/pull/120