From db4664ec1199ff93309d9099b824c3e66a27bb89 Mon Sep 17 00:00:00 2001 From: "Hugh A. Miles II" Date: Fri, 15 Jan 2021 18:00:33 -0500 Subject: [PATCH] fix: Add MAX_SQL_ROW value to LIMIT_DROPDOWN (#12555) --- superset-frontend/src/SqlLab/components/SqlEditor.jsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/superset-frontend/src/SqlLab/components/SqlEditor.jsx b/superset-frontend/src/SqlLab/components/SqlEditor.jsx index 75028eae7..3b2e93649 100644 --- a/superset-frontend/src/SqlLab/components/SqlEditor.jsx +++ b/superset-frontend/src/SqlLab/components/SqlEditor.jsx @@ -539,9 +539,13 @@ class SqlEditor extends React.PureComponent { } renderQueryLimit() { - const menuDropdown = ( + // Adding SQL_MAX_ROW value to dropdown + const { maxRow } = this.props; + LIMIT_DROPDOWN.push(maxRow); + + return ( - {LIMIT_DROPDOWN.map(limit => ( + {[...new Set(LIMIT_DROPDOWN)].map(limit => ( this.setQueryLimit(limit)}> {/* // eslint-disable-line no-use-before-define */} @@ -551,8 +555,6 @@ class SqlEditor extends React.PureComponent { ))} ); - - return menuDropdown; } renderEditorBottomBar() {