Skip to content

Commit

Permalink
fix #363
Browse files Browse the repository at this point in the history
  • Loading branch information
AllenFang committed Mar 26, 2016
1 parent fbc4654 commit d24f1c4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/store/TableDataStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,11 @@ export class TableDataStore {
} else {
searchTextArray.push(searchText);
}

const source = this.isOnFilter ? this.filteredData : this.data;
// Mark following code for fixing #363
// To avoid to search on a data which be searched or filtered
// But this solution have a poor performance, because I do a filter again
// const source = this.isOnFilter ? this.filteredData : this.data;
const source = this.filterObj !== null ? this.filter(this.filterObj) : this.data;

this.filteredData = source.filter( row => {
const keys = Object.keys(row);
Expand Down

0 comments on commit d24f1c4

Please sign in to comment.