-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Debounce isn't working correctly #149
Comments
As weird as it may seem, this is actually working as expected. The behavior your seeing is caused by the following 2 implementation details:
Once you start backspacing from
Hopefully I did an ok job explaining this, if you have any follow-up questions let me know. |
Thanks for the explanation, I thought the debounce was basically just resetting a 300ms timeout every keypress, and once the timeout is able to expire, send a query with the current input value. Would step 7 of your explanation make more sense to check if |
Yep, this would make a lot more sense. I'm going to use this issue to track that change. |
Wouldn't it be more logical to just do a |
Doing a |
I'm running into this issue, or something like it. Things have changed now with Bloodhound being its own component. My issue: The sequence of events is like this (with debounce rateLimit fn):
In the event that we hit the requestCache, the rateLimited request can be cancelled. Not exactly sure how to go about it, though (since rateLimit can be debounce, throttle, or even custom) |
Fixed for v0.10.3. |
On the examples page:
http://twitter.github.com/typeahead.js/examples/
Go down to the Best Picture Winners and open the network inspector. Type in 'all' and see one remote request made to
all.json
. If you quickly hit backspace three times to clear the input, a second request should not be made, but one is made toal.json
.Chrome 26.0.1410.43 m
The text was updated successfully, but these errors were encountered: