Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
componentWillReceiveProps(nextProps) {
if (!_.isEqual(this.props, nextProps)) {
this.setReact(nextProps);
let size = null,
from = null;
if (this.props.size !== nextProps.size || this.props.from != nextProps.from) {
size = nextProps.size;
from = nextProps.from;
}
manager.update(this.channelId, this.react, size, from, nextProps.stream);
}
if (nextProps.pagination !== this.pagination) {
this.pagination = nextProps.pagination;
this.setState({
requestOnScroll: !nextProps.pagination
});
}
}
componentWillReceiveProps(nextProps) {
if (!_.isEqual(this.props.defaultSelected, nextProps.defaultSelected)) {
this.changeValue(nextProps.defaultSelected);
}
if (!_.isEqual(this.props.react, nextProps.react)) {
this.setReact(nextProps);
manager.update(this.channelId, this.react, nextProps.size, 0, false);
}
}
componentWillReceiveProps(nextProps) {
if (!_.isEqual(this.props.react, nextProps.react)) {
this.setReact(nextProps);
manager.update(this.channelId, this.react, nextProps.size, 0, false);
}
if (this.props.highlight !== nextProps.highlight) {
this.setQueryInfo(nextProps);
this.handleSearch({
value: this.state.currentValue.label
});
}
}
componentWillReceiveProps(nextProps) {
if (!_.isEqual(this.props, nextProps)) {
this.setReact(nextProps);
let size = null,
from = null;
if (this.props.size !== nextProps.size || this.props.from != nextProps.from) {
size = nextProps.size;
from = nextProps.from;
}
manager.update(this.channelId, this.react, size, from, nextProps.stream);
}
if (nextProps.pagination !== this.pagination) {
this.pagination = nextProps.pagination;
this.setState({
requestOnScroll: !nextProps.pagination
});
}
}
componentWillReceiveProps(nextProps) {
if (!_.isEqual(this.props.react, nextProps.react)) {
this.setReact(nextProps);
manager.update(this.channelId, this.react, nextProps.size, 0, false);
}
this.updateValues(nextProps.defaultSelected);
}
componentWillReceiveProps(nextProps) {
if (!_.isEqual(this.props.react, nextProps.react) || this.props.size !== nextProps.size) {
this.setReact(nextProps);
manager.update(this.channelId, this.react, nextProps.size, 0, false);
}
if (this.props.multiSelect !== nextProps.multiSelect) {
this.type = nextProps.multiSelect ? "terms" : "term";
}
if (this.props.showFilter !== nextProps.showFilter || this.props.filterLabel !== nextProps.filterLabel) {
this.setQueryInfo(nextProps);
this.changeValue(this.defaultSelected, true);
}
if (this.props.defaultSelected !== nextProps.defaultSelected) {
this.checkDefault(nextProps);
}
}
componentWillReceiveProps(nextProps) {
if (!_.isEqual(this.props.defaultSelected, nextProps.defaultSelected)) {
this.changeValue(nextProps.defaultSelected);
}
if (!_.isEqual(this.props.react, nextProps.react)) {
this.setReact(nextProps);
manager.update(this.channelId, this.react, nextProps.size, 0, false);
}
}