This is an automated email from the ASF dual-hosted git repository. michaelsmolina pushed a commit to branch 3.0 in repository https://gitbox.apache.org/repos/asf/superset.git
commit f467310cea1c261cfdb845314aba37ffda68e775 Author: Siva Sathyaseelan <[email protected]> AuthorDate: Thu Jan 4 20:03:07 2024 +0530 fix(dashboard): Chart menu disable is fixed on chart-fullscreen in issue #25992 (#26410) (cherry picked from commit d0ffe9af7c802b2a996e3b2029838eedb93aa03b) --- superset-frontend/src/components/Dropdown/index.tsx | 8 +------- .../src/components/ReportModal/HeaderReportDropdown/index.tsx | 7 +++++++ .../src/dashboard/components/SliceHeaderControls/index.tsx | 7 +++++++ 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/superset-frontend/src/components/Dropdown/index.tsx b/superset-frontend/src/components/Dropdown/index.tsx index c40f479579..1e2e03ceb2 100644 --- a/superset-frontend/src/components/Dropdown/index.tsx +++ b/superset-frontend/src/components/Dropdown/index.tsx @@ -104,12 +104,6 @@ interface ExtendedDropDownProps extends DropDownProps { ref?: RefObject<HTMLDivElement>; } -// @z-index-below-dashboard-header (100) - 1 = 99 export const NoAnimationDropdown = ( props: ExtendedDropDownProps & { children?: React.ReactNode }, -) => ( - <AntdDropdown - overlayStyle={{ zIndex: 99, animationDuration: '0s' }} - {...props} - /> -); +) => <AntdDropdown overlayStyle={props.overlayStyle} {...props} />; diff --git a/superset-frontend/src/components/ReportModal/HeaderReportDropdown/index.tsx b/superset-frontend/src/components/ReportModal/HeaderReportDropdown/index.tsx index 4f560a2294..2e83dc3017 100644 --- a/superset-frontend/src/components/ReportModal/HeaderReportDropdown/index.tsx +++ b/superset-frontend/src/components/ReportModal/HeaderReportDropdown/index.tsx @@ -191,6 +191,12 @@ export default function HeaderReportDropDown({ const showReportSubMenu = report && setShowReportSubMenu && canAddReports(); + // @z-index-below-dashboard-header (100) - 1 = 99 + const dropdownOverlayStyle = { + zIndex: 99, + animationDuration: '0s', + }; + useEffect(() => { if (showReportSubMenu) { setShowReportSubMenu(true); @@ -288,6 +294,7 @@ export default function HeaderReportDropDown({ <> <NoAnimationDropdown overlay={menu()} + overlayStyle={dropdownOverlayStyle} trigger={['click']} getPopupContainer={(triggerNode: any) => triggerNode.closest('.action-button') diff --git a/superset-frontend/src/dashboard/components/SliceHeaderControls/index.tsx b/superset-frontend/src/dashboard/components/SliceHeaderControls/index.tsx index 287d83692f..17d5bdc83e 100644 --- a/superset-frontend/src/dashboard/components/SliceHeaderControls/index.tsx +++ b/superset-frontend/src/dashboard/components/SliceHeaderControls/index.tsx @@ -373,6 +373,12 @@ const SliceHeaderControls = (props: SliceHeaderControlsPropsWithRouter) => { ? t('Exit fullscreen') : t('Enter fullscreen'); + // @z-index-below-dashboard-header (100) - 1 = 99 for !isFullSize and 101 for isFullSize + const dropdownOverlayStyle = { + zIndex: isFullSize ? 101 : 99, + animationDuration: '0s', + }; + const menu = ( <Menu onClick={handleMenuClick} @@ -541,6 +547,7 @@ const SliceHeaderControls = (props: SliceHeaderControlsPropsWithRouter) => { )} <NoAnimationDropdown overlay={menu} + overlayStyle={dropdownOverlayStyle} trigger={['click']} placement="bottomRight" >
