mirror of
https://github.com/apache/superset.git
synced 2024-09-12 16:49:40 -04:00
fix: multiple issues with FilterPopover (#11412)
* fix: Custom SQL in FilterPopover * Also fix #11394 * linting * fix tests
This commit is contained in:
parent
df15a6fc51
commit
5b968e9651
@ -87,7 +87,7 @@ describe('Annotations', () => {
|
||||
.within(() => {
|
||||
cy.get('input').type('y=1400000');
|
||||
});
|
||||
cy.get('button').contains('OK').click();
|
||||
cy.get('button').contains('OK').click({ force: true });
|
||||
});
|
||||
|
||||
cy.get('button[data-test="run-query-button"]').click();
|
||||
|
@ -20,6 +20,7 @@ import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Tab, Tabs } from 'react-bootstrap';
|
||||
import Button from 'src/components/Button';
|
||||
import { t } from '@superset-ui/core';
|
||||
|
||||
import columnType from '../propTypes/columnType';
|
||||
import adhocMetricType from '../propTypes/adhocMetricType';
|
||||
@ -178,6 +179,9 @@ export default class AdhocFilterEditPopover extends React.Component {
|
||||
</Tab>
|
||||
</Tabs>
|
||||
<div>
|
||||
<Button buttonSize="small" onClick={this.props.onClose} cta>
|
||||
{t('Close')}
|
||||
</Button>
|
||||
<Button
|
||||
data-test="adhoc-filter-edit-popover-save-button"
|
||||
disabled={!stateIsValid}
|
||||
@ -189,10 +193,7 @@ export default class AdhocFilterEditPopover extends React.Component {
|
||||
onClick={this.onSave}
|
||||
cta
|
||||
>
|
||||
Save
|
||||
</Button>
|
||||
<Button buttonSize="small" onClick={this.props.onClose} cta>
|
||||
Close
|
||||
{t('Save')}
|
||||
</Button>
|
||||
<i
|
||||
role="button"
|
||||
|
@ -68,7 +68,7 @@ export default class AdhocFilterEditPopoverSqlTabContent extends React.Component
|
||||
onSqlExpressionClauseChange(clause) {
|
||||
this.props.onChange(
|
||||
this.props.adhocFilter.duplicateWith({
|
||||
clause: clause && clause.clause,
|
||||
clause,
|
||||
expressionType: EXPRESSION_TYPES.SQL,
|
||||
}),
|
||||
);
|
||||
@ -123,9 +123,9 @@ export default class AdhocFilterEditPopoverSqlTabContent extends React.Component
|
||||
className="filter-edit-clause-dropdown"
|
||||
/>
|
||||
<span className="filter-edit-clause-info">
|
||||
<strong>Where</strong> filters by columns.
|
||||
<strong>WHERE</strong> {t('filters by columns')}
|
||||
<br />
|
||||
<strong>Having</strong> filters by metrics.
|
||||
<strong>HAVING</strong> {t('filters by metrics')}
|
||||
</span>
|
||||
</FormGroup>
|
||||
<FormGroup>
|
||||
|
Loading…
Reference in New Issue
Block a user