You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is that, after fastly typing SFO, the results for S are delivered last, and that's what my component displays.
Before I was using AJAX call to our backend, and I was able to just cancel the promise (so the old promises never resolved).
I tried comparing the last query with the results query and throwing an exception to reject promise, but then it's treated as API error. I need a wait to clear the promise altogether.
The text was updated successfully, but these errors were encountered:
Is there a way to cancel a promise?
I am trying to integrate Algolia client-side search with react-select async component
https://react-select.com/async
The problem I am having is that on every input change, there is a callback being called, where I am calling
The problem is that, after fastly typing
S
F
O
, the results forS
are delivered last, and that's what my component displays.Before I was using AJAX call to our backend, and I was able to just cancel the promise (so the old promises never resolved).
I tried comparing the last query with the results query and throwing an exception to reject promise, but then it's treated as API error. I need a wait to clear the promise altogether.
The text was updated successfully, but these errors were encountered: