I have a race condition manifesting when a user does a search, quickly conducts their spelling (backspace) and then completes their query. We have been finding that the removal of characters takes longer for the query to complete, and thus the asynchronous return is causing havoc with the user searches. How can I build in a way to abort the fetch or set up the necessary promises in the short index.js.erb snippet?
I have a race condition manifesting when a user does a search, quickly conducts their spelling (backspace) and then completes their query. We have been finding that the removal of characters takes longer for the query to complete, and thus the asynchronous return is causing havoc with the user searches. How can I build in a way to abort the fetch or set up the necessary promises in the short
index.js.erb
snippet?