mirror of
https://github.com/apache/superset.git
synced 2024-09-16 10:39:55 -04:00
fix(dashboard): drag preview not working (#21432)
This commit is contained in:
parent
7401f15add
commit
99628d3e84
@ -26,6 +26,7 @@ import React, {
|
|||||||
import { QueryObjectFilterClause, t, styled } from '@superset-ui/core';
|
import { QueryObjectFilterClause, t, styled } from '@superset-ui/core';
|
||||||
import { Menu } from 'src/components/Menu';
|
import { Menu } from 'src/components/Menu';
|
||||||
import { AntdDropdown as Dropdown } from 'src/components';
|
import { AntdDropdown as Dropdown } from 'src/components';
|
||||||
|
import ReactDOM from 'react-dom';
|
||||||
|
|
||||||
const MENU_ITEM_HEIGHT = 32;
|
const MENU_ITEM_HEIGHT = 32;
|
||||||
const MENU_VERTICAL_SPACING = 32;
|
const MENU_VERTICAL_SPACING = 32;
|
||||||
@ -116,7 +117,7 @@ const ChartContextMenu = (
|
|||||||
[open],
|
[open],
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return ReactDOM.createPortal(
|
||||||
<Dropdown
|
<Dropdown
|
||||||
overlay={menu}
|
overlay={menu}
|
||||||
trigger={['click']}
|
trigger={['click']}
|
||||||
@ -133,7 +134,8 @@ const ChartContextMenu = (
|
|||||||
height: 1,
|
height: 1,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Dropdown>
|
</Dropdown>,
|
||||||
|
document.body,
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user