FIX: Search spinners hides all results when loading more.

FIX: Search spinners hides all results when loading more.

Regression from bc81f64a6429caee6cf110b7c2698e290e62c8e1.

diff --git a/app/assets/javascripts/discourse/controllers/full-page-search.js.es6 b/app/assets/javascripts/discourse/controllers/full-page-search.js.es6
index d0daacc..12f970e 100644
--- a/app/assets/javascripts/discourse/controllers/full-page-search.js.es6
+++ b/app/assets/javascripts/discourse/controllers/full-page-search.js.es6
@@ -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");

GitHub sha: d50deac6

1 Like

FIX: Disable buttons when loading more results on full page search.