FIX: Search spinners hides all results when loading more.

Regression from bc81f64a64.
This commit is contained in:
Guo Xiang Tan 2019-03-20 13:34:56 +08:00
parent 50e9a66e89
commit d50deac676
1 changed files with 5 additions and 2 deletions

View File

@ -204,6 +204,8 @@ export default Ember.Controller.extend({
return page === PAGE_LIMIT;
},
searchButtonDisabled: Ember.computed.or("searching", "loading"),
_search() {
if (this.get("searching")) {
return;
@ -218,11 +220,12 @@ export default Ember.Controller.extend({
let args = { q: searchTerm, page: this.get("page") };
this.set("searching", true);
this.set("loading", true);
if (args.page === 1) {
this.set("bulkSelectEnabled", false);
this.get("selected").clear();
this.set("searching", true);
} else {
this.set("loading", true);
}
const sortOrder = this.get("sortOrder");