Skip to content
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