Remove componentWillReceiveProps from search

[MAILPOET-2133]
This commit is contained in:
Pavel Dohnal
2019-06-25 15:50:49 +02:00
committed by M. Shull
parent f6a3db999a
commit a4f80d4c00

View File

@@ -12,8 +12,12 @@ class ListingSearch extends React.Component {
this.onChange = this.onChange.bind(this); this.onChange = this.onChange.bind(this);
} }
componentWillReceiveProps(nextProps) { componentDidUpdate(prevProps) {
this.setState({ search: nextProps.search }); if (prevProps.search !== this.props.search) {
setImmediate(() => {
this.setState({ search: this.props.search });
});
}
} }
onChange(e) { onChange(e) {