Skip to content
This repository was archived by the owner on Jan 15, 2022. It is now read-only.

Commit 8727e97

Browse files
committed
Update table.jsx
1 parent 9adf60b commit 8727e97

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/reactable/table.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,14 +204,14 @@ export class Table extends React.Component {
204204
componentWillMount() {
205205
this.initialize(this.props);
206206
this.sortByCurrentSort();
207-
this.filterBy(this.props.filterBy);
207+
this.filterBy(this.props.filterBy != null ? this.props.filterBy : this.state.filter);
208208
}
209209

210210
componentWillReceiveProps(nextProps) {
211211
this.initialize(nextProps);
212212
this.updateCurrentSort(nextProps.sortBy);
213213
this.sortByCurrentSort();
214-
this.filterBy(nextProps.filterBy);
214+
this.filterBy(nextProps.filterBy != null ? nextProps.filterBy : this.state.filter);
215215
}
216216

217217
applyFilter(filter, children) {

0 commit comments

Comments
 (0)