mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
fix: Remove button is broken for metrics on Explore (#22940)
This commit is contained in:
parent
eaf53dbb27
commit
ebed50fd12
@ -121,7 +121,10 @@ class AdhocFilterControl extends React.Component {
|
|||||||
sections={this.props.sections}
|
sections={this.props.sections}
|
||||||
operators={this.props.operators}
|
operators={this.props.operators}
|
||||||
datasource={this.props.datasource}
|
datasource={this.props.datasource}
|
||||||
onRemoveFilter={() => this.onRemoveFilter(index)}
|
onRemoveFilter={e => {
|
||||||
|
e.stopPropagation();
|
||||||
|
this.onRemoveFilter(index);
|
||||||
|
}}
|
||||||
onMoveLabel={this.moveLabel}
|
onMoveLabel={this.moveLabel}
|
||||||
onDropLabel={() => this.props.onChange(this.state.values)}
|
onDropLabel={() => this.props.onChange(this.state.values)}
|
||||||
partitionColumn={this.state.partitionColumn}
|
partitionColumn={this.state.partitionColumn}
|
||||||
@ -195,6 +198,7 @@ class AdhocFilterControl extends React.Component {
|
|||||||
onRemoveFilter(index) {
|
onRemoveFilter(index) {
|
||||||
const { confirmDeletion } = this.props;
|
const { confirmDeletion } = this.props;
|
||||||
const { values } = this.state;
|
const { values } = this.state;
|
||||||
|
const { removeFilter } = this;
|
||||||
if (confirmDeletion) {
|
if (confirmDeletion) {
|
||||||
const { confirmationText, confirmationTitle, triggerCondition } =
|
const { confirmationText, confirmationTitle, triggerCondition } =
|
||||||
confirmDeletion;
|
confirmDeletion;
|
||||||
@ -203,7 +207,7 @@ class AdhocFilterControl extends React.Component {
|
|||||||
title: confirmationTitle,
|
title: confirmationTitle,
|
||||||
content: confirmationText,
|
content: confirmationText,
|
||||||
onOk() {
|
onOk() {
|
||||||
this.removeFilter(index);
|
removeFilter(index);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
|
@ -308,10 +308,7 @@ export const OptionControlLabel = ({
|
|||||||
<CloseContainer
|
<CloseContainer
|
||||||
role="button"
|
role="button"
|
||||||
data-test="remove-control-button"
|
data-test="remove-control-button"
|
||||||
onClick={e => {
|
onClick={onRemove}
|
||||||
e.stopPropagation();
|
|
||||||
onRemove();
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
<Icons.XSmall iconColor={theme.colors.grayscale.light1} />
|
<Icons.XSmall iconColor={theme.colors.grayscale.light1} />
|
||||||
</CloseContainer>
|
</CloseContainer>
|
||||||
|
Loading…
Reference in New Issue
Block a user