Skip to content

Commit

Permalink
fix #213
Browse files Browse the repository at this point in the history
  • Loading branch information
AllenFang committed Jan 16, 2016
1 parent 64c24eb commit 0ce3eb4
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/store/TableDataStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,11 @@ export class TableDataStore {
for (var key in filterObj) {
let filterVal = filterObj[key].toLowerCase();
let targetVal = row[key];
const { format, filterFormatted } = this.colInfos[key];

if(filterFormatted && format) {
targetVal = format(row[key], row);
if(this.colInfos[key]) {
const { format, filterFormatted } = this.colInfos[key];
if(filterFormatted && format) {
targetVal = format(row[key], row);
}
}
if (targetVal.toString().toLowerCase().indexOf(filterVal) == -1) {
valid = false;
Expand Down Expand Up @@ -221,7 +222,7 @@ export class TableDataStore {
}

for (var key in row) {
if (row[key]) {
if (this.colInfos[key] && row[key]) {
searchTextArray.forEach( text => {
let filterVal = text.toLowerCase();
let targetVal = row[key];
Expand Down

0 comments on commit 0ce3eb4

Please sign in to comment.