Revert "Revert "DEV: Wrap Ember.run.debounce. (#11352)"" (#11509)

* Revert "Revert "DEV: Wrap `Ember.run.debounce`. (#11352)" (#11465)"

This reverts commit aa0d4ea764959bd7ec5127f78dbec68de4dc8337.

* Correctly debounce onScroll function
This commit is contained in:
Roman Rizzi
2020-12-18 10:18:52 -03:00
committed by GitHub
parent f296ca4b4a
commit 142e0ae062
51 changed files with 526 additions and 358 deletions

View File

@ -1,7 +1,7 @@
import Controller from "@ember/controller";
import { INPUT_DELAY } from "discourse-common/config/environment";
import { debounce } from "@ember/runloop";
import discourseComputed from "discourse-common/utils/decorators";
import discourseDebounce from "discourse-common/lib/debounce";
const { get } = Ember;
@ -34,7 +34,7 @@ export default Controller.extend({
actions: {
filterReports(filter) {
debounce(this, this._performFiltering, filter, INPUT_DELAY);
discourseDebounce(this, this._performFiltering, filter, INPUT_DELAY);
},
},