Skip to content

Commit

Permalink
fix: Add MAX_SQL_ROW value to LIMIT_DROPDOWN (#12555)
Browse files Browse the repository at this point in the history
  • Loading branch information
hughhhh authored and villebro committed Jan 16, 2021
1 parent 7e0eedc commit ae6e540
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 ae6e540

Please sign in to comment.