From 99628d3e84930e1a3751e9e8c9648a82d4f7ec1b Mon Sep 17 00:00:00 2001 From: Stephen Liu <750188453@qq.com> Date: Mon, 12 Sep 2022 19:34:28 +0800 Subject: [PATCH] fix(dashboard): drag preview not working (#21432) --- superset-frontend/src/components/Chart/ChartContextMenu.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/superset-frontend/src/components/Chart/ChartContextMenu.tsx b/superset-frontend/src/components/Chart/ChartContextMenu.tsx index 612bd455d0018..2eba7bbaad95e 100644 --- a/superset-frontend/src/components/Chart/ChartContextMenu.tsx +++ b/superset-frontend/src/components/Chart/ChartContextMenu.tsx @@ -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; @@ -116,7 +117,7 @@ const ChartContextMenu = ( [open], ); - return ( + return ReactDOM.createPortal( - + , + document.body, ); };