Merge pull request #3379 from influxdata/fixes/missing-tag-values
TagKeyDropdown uses source provided by props instead of contextpull/3389/head
commit
5b9696ec28
|
@ -53,12 +53,10 @@ class TagKeyDropdown extends Component {
|
|||
tagKey,
|
||||
onSelectTagKey,
|
||||
onErrorThrown,
|
||||
} = this.props
|
||||
const {
|
||||
source: {
|
||||
links: {proxy},
|
||||
},
|
||||
} = this.context
|
||||
} = this.props
|
||||
|
||||
try {
|
||||
const {data} = await showTagKeys({source: proxy, database, measurement})
|
||||
|
@ -78,15 +76,12 @@ class TagKeyDropdown extends Component {
|
|||
|
||||
const {func, shape, string} = PropTypes
|
||||
|
||||
TagKeyDropdown.contextTypes = {
|
||||
TagKeyDropdown.propTypes = {
|
||||
source: shape({
|
||||
links: shape({
|
||||
proxy: string.isRequired,
|
||||
}).isRequired,
|
||||
}).isRequired,
|
||||
}
|
||||
|
||||
TagKeyDropdown.propTypes = {
|
||||
database: string.isRequired,
|
||||
measurement: string.isRequired,
|
||||
tagKey: string,
|
||||
|
|
|
@ -90,6 +90,7 @@ const TemplateQueryBuilder = ({
|
|||
<span className="tvm-query-builder--text">WITH KEY =</span>
|
||||
{selectedMeasurement ? (
|
||||
<TagKeyDropdown
|
||||
source={source}
|
||||
database={selectedDatabase}
|
||||
measurement={selectedMeasurement}
|
||||
tagKey={selectedTagKey}
|
||||
|
|
Loading…
Reference in New Issue