Browse Source

Defect: Deselecting select values doesn't always update grid

manually setting bootstrap’s searchText value to something unique to
guarantee bootstrap will call the initSearch() method
James Mikesell 9 years ago
parent
commit
3b5462363b
1 changed files with 7 additions and 0 deletions
  1. 7 0
      src/extensions/filter-control/bootstrap-table-filter-control.js

+ 7 - 0
src/extensions/filter-control/bootstrap-table-filter-control.js

@@ -479,6 +479,13 @@
             delete this.filterColumnsPartial[$field];
         }
 
+        // if the searchText is the same as the previously selected column value,
+        // bootstrapTable will not try searching again (even though the selected column
+        // may be different from the previous search).  As a work around
+        // we're manually appending some text to bootrap's searchText field
+        // to guarantee that it will perform a search again when we call this.onSearch(event)
+        this.searchText += "randomText";
+
         this.options.pageNumber = 1;
         this.onSearch(event);
         this.updatePagination();