Skip to content

Commit

Permalink
fix(search): ES-2439 adding a variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Saurabh Gedam committed Sep 10, 2021
1 parent 37a92e4 commit fb6a749
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion assets/js/theme/global/quick-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export default function () {
};

// stagger searching for 200ms after last input
const debounceWaitTime = 1200;
const doSearch = _.debounce((searchQuery) => {
utils.api.search.search(searchQuery, { template: 'search/quick-results' }, (err, response) => {
if (err) {
Expand Down Expand Up @@ -62,7 +63,7 @@ export default function () {
}, 100);
}
});
}, 1200);
}, debounceWaitTime);

utils.hooks.on('search-quick', (event, currentTarget) => {
const searchQuery = $(currentTarget).val();
Expand Down

0 comments on commit fb6a749

Please sign in to comment.