mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
cleanup
This commit is contained in:
parent
02b745f106
commit
2b8185cb80
@ -33,14 +33,15 @@ export class StackdriverPicker extends React.Component<Props, State> {
|
|||||||
this.setState({ options: this.buildOptions(this.props) });
|
this.setState({ options: this.buildOptions(this.props) });
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps) {
|
componentWillReceiveProps(nextProps: Props) {
|
||||||
if (nextProps.options.length > 0 || nextProps.templateVariables.length) {
|
if (nextProps.options.length > 0 || nextProps.templateVariables.length) {
|
||||||
this.setState({ options: this.buildOptions(nextProps) });
|
this.setState({ options: this.buildOptions(nextProps) });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
shouldComponentUpdate(nextProps) {
|
shouldComponentUpdate(nextProps: Props) {
|
||||||
return (
|
return (
|
||||||
|
nextProps.selected !== this.props.selected ||
|
||||||
!_.isEqual(nextProps.options, this.props.options) ||
|
!_.isEqual(nextProps.options, this.props.options) ||
|
||||||
!_.isEqual(nextProps.templateVariables, this.props.templateVariables)
|
!_.isEqual(nextProps.templateVariables, this.props.templateVariables)
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user