Pass config to raw query editor

pull/1232/head
Andrew Watkins 2017-04-07 13:52:10 -06:00
parent cc5e940b98
commit e2963e591a
2 changed files with 9 additions and 3 deletions

View File

@ -78,7 +78,7 @@ const QueryEditor = React.createClass({
return (
<div className="query-builder--tab-contents">
<div>
<RawQueryEditor query={q} onUpdate={this.handleEditRawText} />
<RawQueryEditor query={q} config={query} onUpdate={this.handleEditRawText} />
{this.renderLists()}
</div>
</div>

View File

@ -6,10 +6,16 @@ import {QUERY_TEMPLATES} from 'src/data_explorer/constants'
const ENTER = 13
const ESCAPE = 27
const {
func,
shape,
string,
} = PropTypes
const RawQueryEditor = React.createClass({
propTypes: {
query: PropTypes.string.isRequired,
onUpdate: PropTypes.func.isRequired,
query: string.isRequired,
onUpdate: func.isRequired,
config: shape().isRequired,
},
getInitialState() {