From 0ce3eb478a1cf7700adf6ddc973b304b56cfdad1 Mon Sep 17 00:00:00 2001 From: AllenFang Date: Sat, 16 Jan 2016 13:15:27 +0800 Subject: [PATCH] fix #213 --- src/store/TableDataStore.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/store/TableDataStore.js b/src/store/TableDataStore.js index dffb7504a..7430be2b6 100644 --- a/src/store/TableDataStore.js +++ b/src/store/TableDataStore.js @@ -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; @@ -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];