From cf50cf167ccb6e8235b5b784bd1fd6d61e155d29 Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Wed, 19 Dec 2018 21:19:43 +0100 Subject: [PATCH] rename selected prop --- .../datasource/stackdriver/components/StackdriverPicker.tsx | 6 +++--- .../datasource/stackdriver/partials/query.aggregation.html | 6 +++--- .../datasource/stackdriver/partials/query.filter.html | 4 ++-- public/app/plugins/datasource/stackdriver/query_ctrl.ts | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/public/app/plugins/datasource/stackdriver/components/StackdriverPicker.tsx b/public/app/plugins/datasource/stackdriver/components/StackdriverPicker.tsx index 349c4c33b58..7f7e6f901fa 100644 --- a/public/app/plugins/datasource/stackdriver/components/StackdriverPicker.tsx +++ b/public/app/plugins/datasource/stackdriver/components/StackdriverPicker.tsx @@ -6,7 +6,7 @@ export interface Props { onChange: (value: string) => void; options: any[]; isSearchable: boolean; - selected: string; + value: string; placeholder?: string; className?: string; groupName?: string; @@ -41,7 +41,7 @@ export class StackdriverPicker extends React.Component { shouldComponentUpdate(nextProps: Props) { const nextOptions = this.buildOptions(nextProps); - return nextProps.selected !== this.props.selected || !_.isEqual(nextOptions, this.state.options); + return nextProps.value !== this.props.value || !_.isEqual(nextOptions, this.state.options); } buildOptions({ templateVariables = [], groupName = '', options }) { @@ -70,7 +70,7 @@ export class StackdriverPicker extends React.Component { getSelectedOption() { const { options } = this.state; const allOptions = options.every(o => o.options) ? _.flatten(options.map(o => o.options)) : options; - return allOptions.find(option => option.value === this.props.selected); + return allOptions.find(option => option.value === this.props.value); } render() { diff --git a/public/app/plugins/datasource/stackdriver/partials/query.aggregation.html b/public/app/plugins/datasource/stackdriver/partials/query.aggregation.html index 3ffcb1d7bbf..8d053256a2d 100755 --- a/public/app/plugins/datasource/stackdriver/partials/query.aggregation.html +++ b/public/app/plugins/datasource/stackdriver/partials/query.aggregation.html @@ -3,7 +3,7 @@ Aligner Alignment Period Service Metric