feat: saved query list actions (#11109)

This commit is contained in:
Moriah Kreeger
2020-09-30 18:18:34 -07:00
committed by GitHub
parent 5b284e67eb
commit e7a4265c30
7 changed files with 367 additions and 89 deletions

View File

@@ -150,8 +150,12 @@ class TabbedSqlEditors extends React.PureComponent {
this.props.actions.addQueryEditor(newQueryEditor);
}
this.popNewTab();
} else if (this.props.queryEditors.length === 0) {
} else if (query.new || this.props.queryEditors.length === 0) {
this.newQueryEditor();
if (query.new) {
window.history.replaceState({}, document.title, this.state.sqlLabUrl);
}
} else {
const qe = this.activeQueryEditor();
const latestQuery = this.props.queries[qe.latestQueryId];