Skip to content

Commit

Permalink
add max row to dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
hughhhh committed Jan 15, 2021
1 parent fc5e311 commit d607bfe
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions superset-frontend/src/SqlLab/components/SqlEditor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand All @@ -551,8 +555,6 @@ class SqlEditor extends React.PureComponent {
))}
</AntdMenu>
);

return menuDropdown;
}

renderEditorBottomBar() {
Expand Down

0 comments on commit d607bfe

Please sign in to comment.