Set default limit on creation of new qe and on run (#6400)

This commit is contained in:
Jeffrey Wang
2018-11-15 18:38:51 -05:00
committed by timifasubaa
parent c17de3940c
commit 8c4f723a61
2 changed files with 2 additions and 1 deletions

View File

@@ -149,7 +149,7 @@ class SqlEditor extends React.PureComponent {
schema: qe.schema,
tempTableName: ctas ? this.state.ctas : '',
templateParams: qe.templateParams,
queryLimit: qe.queryLimit,
queryLimit: qe.queryLimit || this.props.defaultQueryLimit,
runAsync,
ctas,
};

View File

@@ -138,6 +138,7 @@ class TabbedSqlEditors extends React.PureComponent {
sql: `${t(
'-- Note: Unless you save your query, these tabs will NOT persist if you clear your cookies or change browsers.',
)}\n\nSELECT ...`,
queryLimit: this.props.defaultQueryLimit,
};
this.props.actions.addQueryEditor(qe);
}