Enable overwrite sql in QueryHistory (#1731)

This commit is contained in:
vera-liu 2016-12-05 11:34:42 -08:00 committed by GitHub
parent 89fc9d7c80
commit d8864bc92b

View File

@ -39,6 +39,9 @@ class AceEditorWrapper extends React.PureComponent {
if (!areArraysShallowEqual(this.props.tables, nextProps.tables)) {
this.setAutoCompleter(nextProps);
}
if (nextProps.sql !== this.props.sql) {
this.setState({ sql: nextProps.sql });
}
}
textChange(text) {
this.setState({ sql: text });