FIX: debounce search correctly (#24)
Signed-off-by: OsamaSayegh <asooomaasoooma90@gmail.com>
This commit is contained in:
parent
3da00ddaa1
commit
25d3fbdfed
|
@ -9,13 +9,7 @@ export default Component.extend({
|
|||
// TODO: Use discouseDebounce when discourse 2.7 gets released.
|
||||
const debounceFunc = discourseDebounce || debounce;
|
||||
|
||||
debounceFunc(
|
||||
this,
|
||||
function () {
|
||||
this.onSearch(term);
|
||||
},
|
||||
500
|
||||
);
|
||||
debounceFunc(this, "onSearch", term, 500);
|
||||
},
|
||||
|
||||
actions: {
|
||||
|
|
Loading…
Reference in New Issue