From 62621828fc83acddcd6153620405513eda52d552 Mon Sep 17 00:00:00 2001 From: David Kaltschmidt Date: Wed, 23 Jan 2019 12:54:00 +0100 Subject: [PATCH] Default height for editor field --- src/editor/editor_component.tsx | 18 ++++++------- src/partials/query.editor.html | 46 ++++++++++++++++++++++++--------- 2 files changed, 42 insertions(+), 22 deletions(-) diff --git a/src/editor/editor_component.tsx b/src/editor/editor_component.tsx index 90f09c5..be481da 100644 --- a/src/editor/editor_component.tsx +++ b/src/editor/editor_component.tsx @@ -1,9 +1,7 @@ - -import React, { Component } from 'react'; +import React, {Component} from 'react'; import coreModule from 'grafana/app/core/core_module'; - import FluxQueryField from './FluxQueryField'; import flux from './flux'; @@ -20,28 +18,28 @@ class Editor extends Component { } handleChangeQuery = value => { - const { index, change } = this.props; - const { query } = this.state; + const {index, change} = this.props; + const {query} = this.state; const edited = query !== value; - this.setState({ edited, query: value }); + this.setState({edited, query: value}); if (change) { change(value, index); } }; handlePressEnter = () => { - const { execute } = this.props; + const {execute} = this.props; if (execute) { execute(); } }; render() { - const { database, request } = this.props; - const { edited, query } = this.state; + const {database, request} = this.props; + const {edited, query} = this.state; return ( -
+
-
- + - +
- +
- +
- + - +
- - \ No newline at end of file +