You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by st...@apache.org on 2022/09/12 11:34:51 UTC
[superset] branch master updated: fix(dashboard): drag preview not working (#21432)
This is an automated email from the ASF dual-hosted git repository.
stephenlyz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new 99628d3e84 fix(dashboard): drag preview not working (#21432)
99628d3e84 is described below
commit 99628d3e84930e1a3751e9e8c9648a82d4f7ec1b
Author: Stephen Liu <75...@qq.com>
AuthorDate: Mon Sep 12 19:34:28 2022 +0800
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 612bd455d0..2eba7bbaad 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(
<Dropdown
overlay={menu}
trigger={['click']}
@@ -133,7 +134,8 @@ const ChartContextMenu = (
height: 1,
}}
/>
- </Dropdown>
+ </Dropdown>,
+ document.body,
);
};