fix: blocks UI elements on right side (#30886)

Co-authored-by: Evan Rusackas <evan@preset.io>
This commit is contained in:
Sukuna 2024-11-15 22:13:57 +05:30 committed by GitHub
parent 87c73175a7
commit df479940a6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 11 additions and 10 deletions

View File

@ -21,7 +21,7 @@ import { useState, useMemo, useCallback, useEffect } from 'react';
import { ResizeCallback, ResizeStartCallback } from 're-resizable';
import cx from 'classnames';
import { useSelector } from 'react-redux';
import { css } from '@superset-ui/core';
import { css, useTheme } from '@superset-ui/core';
import { LayoutItem, RootState } from 'src/dashboard/types';
import AnchorLink from 'src/dashboard/components/AnchorLink';
import Chart from 'src/dashboard/containers/Chart';
@ -70,15 +70,6 @@ interface ChartHolderProps {
isInView: boolean;
}
const fullSizeStyle = css`
&& {
position: fixed;
z-index: 3000;
left: 0;
top: 0;
}
`;
const ChartHolder: React.FC<ChartHolderProps> = ({
id,
parentId,
@ -102,6 +93,16 @@ const ChartHolder: React.FC<ChartHolderProps> = ({
setFullSizeChartId,
isInView,
}) => {
const theme = useTheme();
const fullSizeStyle = css`
&& {
position: fixed;
z-index: 3000;
left: 0;
top: 0;
padding: ${theme.gridUnit * 2}px;
}
`;
const { chartId } = component.meta;
const isFullSize = fullSizeChartId === chartId;