Commit 2b8185cb by Erik Sundell

cleanup

parent 02b745f1
......@@ -33,14 +33,15 @@ export class StackdriverPicker extends React.Component<Props, State> {
this.setState({ options: this.buildOptions(this.props) });
}
componentWillReceiveProps(nextProps) {
componentWillReceiveProps(nextProps: Props) {
if (nextProps.options.length > 0 || nextProps.templateVariables.length) {
this.setState({ options: this.buildOptions(nextProps) });
}
}
shouldComponentUpdate(nextProps) {
shouldComponentUpdate(nextProps: Props) {
return (
nextProps.selected !== this.props.selected ||
!_.isEqual(nextProps.options, this.props.options) ||
!_.isEqual(nextProps.templateVariables, this.props.templateVariables)
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment