Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-10 04:12:53 +01:00
Use ember debounce until discourseDebounce hits stable
Dieser Commit ist enthalten in:
Ursprung
11ff364cbe
Commit
78dad97dc8
2 geänderte Dateien mit 3 neuen und 6 gelöschten Zeilen
|
@ -84,7 +84,6 @@
|
|||
//= require discourse-common/addon/helpers/component-for-collection
|
||||
//= require discourse-common/addon/helpers/component-for-row
|
||||
//= require discourse-common/addon/lib/raw-templates
|
||||
//= require discourse-common/lib/debounce
|
||||
//= require discourse/app/helpers/discourse-tag
|
||||
|
||||
//= require discourse/app/services/app-events
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import { CANCELLED_STATUS } from 'discourse/lib/autocomplete';
|
||||
import { debounce } from "@ember/runloop";
|
||||
import discourseDebounce from "discourse-common/lib/debounce";
|
||||
import getUrl from 'discourse-common/lib/get-url';
|
||||
|
||||
var cache = {},
|
||||
|
@ -118,10 +117,8 @@ export default function userSearch(options) {
|
|||
resolve(CANCELLED_STATUS);
|
||||
}, 5000);
|
||||
|
||||
// TODO: Use discouseDebounce after the 2.7 release.
|
||||
let debounceFunc = discourseDebounce || debounce;
|
||||
|
||||
debounceFunc(
|
||||
// TODO: Use discouseDebounce after it is available on stable.
|
||||
debounce(
|
||||
this,
|
||||
function() {
|
||||
performSearch(
|
||||
|
@ -140,4 +137,5 @@ export default function userSearch(options) {
|
|||
},
|
||||
300
|
||||
)
|
||||
});
|
||||
}
|
||||
|
|
Laden …
In neuem Issue referenzieren