Closed domsleee closed 1 year ago
Thanks! That definitively is a bug. A regression introduced here https://github.com/mokkabonna/inquirer-autocomplete-prompt/pull/134/files
It was working before. I missed that functional change. And it was not testet apperantly. Will fix and add test if possible.
Ah nice, thanks for the quick fix @mokkabonna
Salutations and thanks for this package π My API is quite slow, and sometimes previous results from a different
input
override the latest results.For example
Reproduction
Consider this code:
I can use this code to go
2000
200
200
is shown on screen2000
is shown on screenThe expected behaviour is that
200
remains on screen, since it is the latest result matching the search querySuggested fix
Currently,
thisPromise
will always equallastPromise
, because it is captured in the closure. It should be usingthis.lastPromise
instead: