Pass config to raw query editor
parent
d86a7f509b
commit
152a3fe257
|
@ -78,7 +78,7 @@ const QueryEditor = React.createClass({
|
||||||
return (
|
return (
|
||||||
<div className="query-builder--tab-contents">
|
<div className="query-builder--tab-contents">
|
||||||
<div>
|
<div>
|
||||||
<RawQueryEditor query={q} onUpdate={this.handleEditRawText} />
|
<RawQueryEditor query={q} config={query} onUpdate={this.handleEditRawText} />
|
||||||
{this.renderLists()}
|
{this.renderLists()}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -6,10 +6,16 @@ import {QUERY_TEMPLATES} from 'src/data_explorer/constants'
|
||||||
|
|
||||||
const ENTER = 13
|
const ENTER = 13
|
||||||
const ESCAPE = 27
|
const ESCAPE = 27
|
||||||
|
const {
|
||||||
|
func,
|
||||||
|
shape,
|
||||||
|
string,
|
||||||
|
} = PropTypes
|
||||||
const RawQueryEditor = React.createClass({
|
const RawQueryEditor = React.createClass({
|
||||||
propTypes: {
|
propTypes: {
|
||||||
query: PropTypes.string.isRequired,
|
query: string.isRequired,
|
||||||
onUpdate: PropTypes.func.isRequired,
|
onUpdate: func.isRequired,
|
||||||
|
config: shape().isRequired,
|
||||||
},
|
},
|
||||||
|
|
||||||
getInitialState() {
|
getInitialState() {
|
||||||
|
|
Loading…
Reference in New Issue