Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dashboard): Chart menu disable is fixed on chart-fullscreen in issue #25992 #26410

Merged
merged 1 commit into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions superset-frontend/src/components/Dropdown/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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} />;
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -541,6 +547,7 @@ const SliceHeaderControls = (props: SliceHeaderControlsPropsWithRouter) => {
)}
<NoAnimationDropdown
overlay={menu}
overlayStyle={dropdownOverlayStyle}
trigger={['click']}
placement="bottomRight"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -288,6 +294,7 @@ export default function HeaderReportDropDown({
<>
<NoAnimationDropdown
overlay={menu()}
overlayStyle={dropdownOverlayStyle}
trigger={['click']}
getPopupContainer={(triggerNode: any) =>
triggerNode.closest('.action-button')
Expand Down
Loading