Skip to content

Commit

Permalink
fix #1302
Browse files Browse the repository at this point in the history
  • Loading branch information
AllenFang committed May 11, 2017
1 parent 4c1cf0a commit 24e5b66
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/BootstrapTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,14 @@ class BootstrapTable extends Component {
sizePerPage,
reset: false
});

if (this.store.isSearching && options.afterSearch) {
options.afterSearch(this.store.searchText, this.store.getDataIgnoringPagination());
}

if (this.store.isFiltering && options.afterColumnFilter) {
options.afterColumnFilter(this.store.filterObj, this.store.getDataIgnoringPagination());
}
}

// If setting the expanded rows is being handled externally
Expand Down
8 changes: 8 additions & 0 deletions src/store/TableDataStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ export class TableDataStore {
this.selected = [];
}

isSearching() {
return this.searchText !== null;
}

isFiltering() {
return this.filterObj !== null;
}

setData(data) {
this.data = data;
if (this.remote) {
Expand Down

0 comments on commit 24e5b66

Please sign in to comment.