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}
|
||||
operators={this.props.operators}
|
||||
datasource={this.props.datasource}
|
||||
onRemoveFilter={() => this.onRemoveFilter(index)}
|
||||
onRemoveFilter={e => {
|
||||
e.stopPropagation();
|
||||
this.onRemoveFilter(index);
|
||||
}}
|
||||
onMoveLabel={this.moveLabel}
|
||||
onDropLabel={() => this.props.onChange(this.state.values)}
|
||||
partitionColumn={this.state.partitionColumn}
|
||||
|
|
@ -195,6 +198,7 @@ class AdhocFilterControl extends React.Component {
|
|||
onRemoveFilter(index) {
|
||||
const { confirmDeletion } = this.props;
|
||||
const { values } = this.state;
|
||||
const { removeFilter } = this;
|
||||
if (confirmDeletion) {
|
||||
const { confirmationText, confirmationTitle, triggerCondition } =
|
||||
confirmDeletion;
|
||||
|
|
@ -203,7 +207,7 @@ class AdhocFilterControl extends React.Component {
|
|||
title: confirmationTitle,
|
||||
content: confirmationText,
|
||||
onOk() {
|
||||
this.removeFilter(index);
|
||||
removeFilter(index);
|
||||
},
|
||||
});
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -308,10 +308,7 @@ export const OptionControlLabel = ({
|
|||
<CloseContainer
|
||||
role="button"
|
||||
data-test="remove-control-button"
|
||||
onClick={e => {
|
||||
e.stopPropagation();
|
||||
onRemove();
|
||||
}}
|
||||
onClick={onRemove}
|
||||
>
|
||||
<Icons.XSmall iconColor={theme.colors.grayscale.light1} />
|
||||
</CloseContainer>
|
||||
|
|
|
|||
Loading…
Reference in New Issue