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

SearchBox query throttling doesn't work #35

Closed
GregoryPotdevin opened this issue Jan 29, 2016 · 0 comments
Closed

SearchBox query throttling doesn't work #35

GregoryPotdevin opened this issue Jan 29, 2016 · 0 comments
Milestone

Comments

@GregoryPotdevin
Copy link
Collaborator

When SearchBox's onChange method is called, the following code is used to generate a new search :

            throttle(()=> {
                this.searchQuery(this.accessor.getQueryString())
            }, 400)()

A new throttled searchQuery function is generated each time, so they just stack up without waiting for the 400ms delay. The throttle function should be created in the constructor or in componentWillMount and reused for every call.

@joemcelroy joemcelroy added this to the 0.5 milestone Jan 29, 2016
@joemcelroy joemcelroy added the bug label Jan 29, 2016
@ssetem ssetem closed this as completed Jan 29, 2016
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

3 participants