Debounce AJAX Query Inputs #14

justindujardin opened this Issue Mar 30, 2012 · 2 comments

2 participants


Beyond min search input, there appears to be no debounce for query inputs into a select2 component. When using ajax queries, I want to throttle them with a typing debounce.

Currently, if I enter the term "Batman" into the movies search select2 (without stopping, and with a min search length of 3), it will fire off more than one query (e.g. "Batm", "Batma", "Batman")

This could be as simple as an option (e.g. queryInputDelay), what do you think?


ive left debouncing out of the input field, thinking that query functions will implement it themselves using whatever algo they like. for example, the query function produced by the ajax helper is debounced and has a quietMillis param.

i suppose adding it to the input field wouldnt hurt, and it can always be disabled...


Ahh, I see. I'm not sure that the debounce of non-ajax queries is super useful. I'll close this for now, and use quietMillis.

@duncanbeevers duncanbeevers pushed a commit that referenced this issue Feb 22, 2014
Dean Sofer Closes #14 d4db89b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment