Commit 78520ac3 by Ivana Huckova Committed by GitHub

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

parent c941718a
......@@ -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>
......
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