Explore: Fix always disabled QueryField for InfluxDB (#20299)

This commit is contained in:
Ivana Huckova 2019-11-11 16:34:37 +01:00 committed by GitHub
parent c941718a5f
commit 78520ac3d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -133,6 +133,7 @@ export class InfluxLogsQueryField extends React.PureComponent<Props, State> {
const { datasource } = this.props;
const { measurements, measurement, field, error } = this.state;
const cascadeText = getChooserText({ measurement, field, error });
const hasMeasurement = measurements && measurements.length > 0;
return (
<div className="gf-form-inline gf-form-inline--nowrap">
@ -143,7 +144,7 @@ export class InfluxLogsQueryField extends React.PureComponent<Props, State> {
onChange={this.onMeasurementsChange}
expandIcon={null}
>
<button className="gf-form-label gf-form-label--btn" disabled={!measurement}>
<button className="gf-form-label gf-form-label--btn" disabled={!hasMeasurement}>
{cascadeText} <i className="fa fa-caret-down" />
</button>
</Cascader>