Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Race condition when conducting a search #194

Open
Boucherie opened this issue Jan 8, 2020 · 0 comments
Open

Race condition when conducting a search #194

Boucherie opened this issue Jan 8, 2020 · 0 comments

Comments

@Boucherie
Copy link

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?

$("#accounts_filterrific_table").html('<%= j render partial: "/accounts/account_table_row", collection: @accounts %>');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant