Skip to content

Commit

Permalink
Fix metrics and filters popover being stale after reordering
Browse files Browse the repository at this point in the history
  • Loading branch information
kgabryje committed Aug 18, 2021
1 parent 638112e commit 191fa12
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,6 @@ export const DndFilterSelect = (props: DndFilterSelectProps) => {
visible={newFilterPopoverVisible}
togglePopover={togglePopover}
closePopover={closePopover}
createNew
>
<div />
</AdhocFilterPopoverTrigger>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,6 @@ export const DndMetricSelect = (props: any) => {
visible={newMetricPopoverVisible}
togglePopover={togglePopover}
closePopover={closePopover}
createNew
>
<div />
</AdhocMetricPopoverTrigger>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,6 @@ class AdhocFilterControl extends React.Component {
options={this.state.options}
onFilterEdit={this.onNewFilter}
partitionColumn={this.state.partitionColumn}
createNew
>
{trigger}
</AdhocFilterPopoverTrigger>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ interface AdhocFilterPopoverTriggerProps {
datasource: Record<string, any>;
onFilterEdit: (editedFilter: AdhocFilter) => void;
partitionColumn?: string;
createNew?: boolean;
isControlledComponent?: boolean;
visible?: boolean;
togglePopover?: (visible: boolean) => void;
Expand Down Expand Up @@ -104,7 +103,7 @@ class AdhocFilterPopoverTrigger extends React.PureComponent<
defaultVisible={visible}
visible={visible}
onVisibleChange={togglePopover}
destroyTooltipOnHide={this.props.createNew}
destroyTooltipOnHide
>
{this.props.children}
</Popover>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export type AdhocMetricPopoverTriggerProps = {
savedMetric: savedMetricType;
datasourceType: string;
children: ReactNode;
createNew?: boolean;
isControlledComponent?: boolean;
visible?: boolean;
togglePopover?: (visible: boolean) => void;
Expand Down Expand Up @@ -232,7 +231,7 @@ class AdhocMetricPopoverTrigger extends React.PureComponent<
visible={visible}
onVisibleChange={togglePopover}
title={popoverTitle}
destroyTooltipOnHide={this.props.createNew}
destroyTooltipOnHide
>
{this.props.children}
</Popover>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ const MetricsControl = ({
datasource={datasource}
savedMetric={emptySavedMetric}
datasourceType={datasourceType}
createNew
>
{trigger}
</AdhocMetricPopoverTrigger>
Expand Down

0 comments on commit 191fa12

Please sign in to comment.