FIX: debounce search correctly (#24)

Signed-off-by: OsamaSayegh <asooomaasoooma90@gmail.com>
This commit is contained in:
Osama Sayegh 2021-01-05 15:16:44 +03:00 committed by GitHub
parent 3da00ddaa1
commit 25d3fbdfed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 7 deletions

View File

@ -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: {