Skip to content

Commit

Permalink
fix(dashboard): drag preview not working (#21432)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenLYZ authored Sep 12, 2022
1 parent 7401f15 commit 99628d3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions superset-frontend/src/components/Chart/ChartContextMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import React, {
import { QueryObjectFilterClause, t, styled } from '@superset-ui/core';
import { Menu } from 'src/components/Menu';
import { AntdDropdown as Dropdown } from 'src/components';
import ReactDOM from 'react-dom';

const MENU_ITEM_HEIGHT = 32;
const MENU_VERTICAL_SPACING = 32;
Expand Down Expand Up @@ -116,7 +117,7 @@ const ChartContextMenu = (
[open],
);

return (
return ReactDOM.createPortal(
<Dropdown
overlay={menu}
trigger={['click']}
Expand All @@ -133,7 +134,8 @@ const ChartContextMenu = (
height: 1,
}}
/>
</Dropdown>
</Dropdown>,
document.body,
);
};

Expand Down

0 comments on commit 99628d3

Please sign in to comment.