Skip to content

Commit e30f86c

Browse files
committed
fix #548
1 parent 0660920 commit e30f86c

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/TableHeaderColumn.js

+10
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,16 @@ class TableHeaderColumn extends Component {
146146
}
147147
}
148148
}
149+
150+
applyFilter(val) {
151+
if (this.props.filter === undefined) return;
152+
switch (this.props.filter.type) {
153+
case Const.FILTER_TYPE.TEXT: {
154+
this.refs.textFilter.applyFilter(val);
155+
break;
156+
}
157+
}
158+
}
149159
}
150160

151161
const filterTypeArray = [];

src/filters/Text.js

+5
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ class TextFilter extends Component {
2424
this.props.filterHandler(value, Const.FILTER_TYPE.TEXT);
2525
}
2626

27+
applyFilter(filterText) {
28+
this.refs.inputText.value = filterText;
29+
this.props.filterHandler(filterText, Const.FILTER_TYPE.TEXT);
30+
}
31+
2732
componentDidMount() {
2833
const defaultValue = this.refs.inputText.value;
2934
if (defaultValue) {

0 commit comments

Comments
 (0)