Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
currentValue: value
});
if (isDefaultValue) {
if (_this3.props.autoSuggest) {
_this3.setState({
isOpen: false
});
_this3.updateQuery(_this3.internalComponent, value);
}
_this3.updateQuery(_this3.props.componentId, value);
} else {
// debounce for handling text while typing
_this3.handleTextChange(value);
}
};
checkValueChange(_this3.props.componentId, value, _this3.props.beforeValueChange, _this3.props.onValueChange, performUpdate);
};
const performUpdate = () => {
this.setState({
currentValue: value,
});
if (isDefaultValue) {
if (props.autosuggest) {
this.updateQuery(this.internalComponent, value, props);
}
this.updateQuery(props.componentId, value, props);
} else {
// debounce for handling text while typing
this.handleTextChange(value);
}
if (props.onValueChange) props.onValueChange(value);
};
checkValueChange(props.componentId, value, props.beforeValueChange, performUpdate);
};
this.setState(
{
currentValue: value,
},
() => {
if (isDefaultValue) {
this.updateQuery(value, props);
if (props.onValueChange) props.onValueChange(value);
} else {
// debounce for handling text while typing
this.handleTextChange(value, props);
}
},
);
};
checkValueChange(props.componentId, value, props.beforeValueChange, performUpdate);
};
this.updateQuery(value, props);
if (props.onValueChange) props.onValueChange(value);
};
if (hasMounted) {
this.setState(
{
currentValue: value,
},
handleUpdates,
);
} else {
handleUpdates();
}
};
checkValueChange(props.componentId, value, props.beforeValueChange, performUpdate);
};
this.updateQuery(value, props, includeUnrated);
if (props.onValueChange) props.onValueChange(value);
};
if (hasMounted) {
this.setState(
{
currentValue: value,
},
handleUpdates,
);
} else {
handleUpdates();
}
};
checkValueChange(props.componentId, value, props.beforeValueChange, performUpdate);
};
if (props.onValueChange) props.onValueChange(finalValues);
};
if (hasMounted) {
this.setState(
{
currentValue,
},
handleUpdates,
);
} else {
handleUpdates();
}
};
checkValueChange(props.componentId, finalValues, props.beforeValueChange, performUpdate);
};
this.getCoordinates(currentValue.value, () => {
if (this.state.currentDistance) {
this.updateQuery(this.state.currentDistance);
if (props.onValueChange) {
props.onValueChange({
distance: this.state.currentDistance,
location: currentValue.value,
});
}
}
});
},
);
};
checkValueChange(
props.componentId,
{ distance: this.state.currentDistance, location: currentValue.value },
props.beforeValueChange,
performUpdate,
);
};
if (props.onValueChange) props.onValueChange(currentValue);
};
if (hasMounted) {
this.setState(
{
currentValue,
},
handleUpdates,
);
} else {
handleUpdates();
}
};
checkValueChange(props.componentId, currentValue, props.beforeValueChange, performUpdate);
};
setValue = (value, props = this.props) => {
const performUpdate = () => {
this.setState(
{
currentValue: value,
},
() => {
this.updateQuery(value, props);
if (props.onValueChange) props.onValueChange(value);
},
);
};
checkValueChange(props.componentId, value, props.beforeValueChange, performUpdate);
};
};
if (hasMounted) {
this.setState(
{
currentValue,
selectedValues,
},
handleUpdates,
);
} else {
handleUpdates();
}
};
checkValueChange(props.componentId, currentValue, props.beforeValueChange, performUpdate);
};