You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by hu...@apache.org on 2021/01/15 18:03:34 UTC

[superset] branch hugh/add-sql-max-row created (now d607bfe)

This is an automated email from the ASF dual-hosted git repository.

hugh pushed a change to branch hugh/add-sql-max-row
in repository https://gitbox.apache.org/repos/asf/superset.git.


      at d607bfe  add max row to dropdown

This branch includes the following new commits:

     new d607bfe  add max row to dropdown

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[superset] 01/01: add max row to dropdown

Posted by hu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hugh pushed a commit to branch hugh/add-sql-max-row
in repository https://gitbox.apache.org/repos/asf/superset.git

commit d607bfe92ff7131a1db5e7cc67bf3ca020259b3a
Author: hughhhh <hu...@gmail.com>
AuthorDate: Fri Jan 15 12:59:23 2021 -0500

    add max row to dropdown
---
 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 75028ea..3b2e936 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 (
       <AntdMenu>
-        {LIMIT_DROPDOWN.map(limit => (
+        {[...new Set(LIMIT_DROPDOWN)].map(limit => (
           <AntdMenu.Item onClick={() => this.setQueryLimit(limit)}>
             {/* // eslint-disable-line no-use-before-define */}
             <a role="button" styling="link">
@@ -551,8 +555,6 @@ class SqlEditor extends React.PureComponent {
         ))}
       </AntdMenu>
     );
-
-    return menuDropdown;
   }
 
   renderEditorBottomBar() {