Skip to content

Commit

Permalink
fix #976
Browse files Browse the repository at this point in the history
  • Loading branch information
AllenFang committed Jan 21, 2017
1 parent 3608056 commit 4c5ef92
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/store/TableDataStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ export class TableDataStore {
return this.filterText(targetVal, filterVal, cond);
}

filterText(targetVal, filterVal, cond) {
filterText(targetVal, filterVal, cond = Const.FILTER_COND_EQ) {
targetVal = targetVal.toString();
filterVal = filterVal.toString();
if (cond === Const.FILTER_COND_EQ) {
Expand Down Expand Up @@ -462,16 +462,17 @@ export class TableDataStore {
break;
}
case Const.FILTER_TYPE.CUSTOM: {
valid = this.filterCustom(targetVal, filterVal,
filterObj[key].value, filterObj[key].props.cond);
const cond = filterObj[key].props ? filterObj[key].props.cond : Const.FILTER_COND_EQ;
valid = this.filterCustom(targetVal, filterVal, filterObj[key].value, cond);
break;
}
default: {
if (filterObj[key].type === Const.FILTER_TYPE.SELECT &&
filterFormatted && filterFormatted && format) {
filterVal = format(filterVal, row, formatExtraData, r);
}
valid = this.filterText(targetVal, filterVal, filterObj[key].props.cond);
const cond = filterObj[key].props ? filterObj[key].props.cond : Const.FILTER_COND_EQ;
valid = this.filterText(targetVal, filterVal, cond);
break;
}
}
Expand Down

0 comments on commit 4c5ef92

Please sign in to comment.