fix: Add MAX_SQL_ROW value to LIMIT_DROPDOWN (#12555)

This commit is contained in:
Hugh A. Miles II 2021-01-15 18:00:33 -05:00 committed by GitHub
parent b50fd3eab0
commit db4664ec11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 4 deletions

View File

@ -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() {