fix(ui): Fix drawer body loading overlay scroll behavior (#23706)

- Add overflow: hidden to outer Box to prevent header/footer scroll
- Move scrolling to inner content container
- Increase overlay zIndex from 1 to 1000 to appear above form fields
- Overlay now stays fixed covering entire body viewport during scroll

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Satish <satish@Satishs-MacBook-Pro.local>
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
satish 2025-10-06 09:02:41 +05:30 committed by GitHub
parent da7a2778f6
commit adada34284
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 40 additions and 34 deletions

View File

@ -21,24 +21,24 @@ import { ResourceEntity } from '../../../context/PermissionProvider/PermissionPr
import { CreateDataProduct } from '../../../generated/api/domains/createDataProduct'; import { CreateDataProduct } from '../../../generated/api/domains/createDataProduct';
import { import {
CreateDomain, CreateDomain,
DomainType DomainType,
} from '../../../generated/api/domains/createDomain'; } from '../../../generated/api/domains/createDomain';
import { Operation } from '../../../generated/entity/policies/policy'; import { Operation } from '../../../generated/entity/policies/policy';
import { EntityReference } from '../../../generated/entity/type'; import { EntityReference } from '../../../generated/entity/type';
import { import {
FieldProp, FieldProp,
FieldTypes, FieldTypes,
FormItemLayout FormItemLayout,
} from '../../../interface/FormUtils.interface'; } from '../../../interface/FormUtils.interface';
import { import {
domainTypeTooltipDataRender, domainTypeTooltipDataRender,
iconTooltipDataRender iconTooltipDataRender,
} from '../../../utils/DomainUtils'; } from '../../../utils/DomainUtils';
import { generateFormFields, getField } from '../../../utils/formUtils'; import { generateFormFields, getField } from '../../../utils/formUtils';
import { checkPermission } from '../../../utils/PermissionsUtils'; import { checkPermission } from '../../../utils/PermissionsUtils';
import { import {
DEFAULT_DATA_PRODUCT_ICON, DEFAULT_DATA_PRODUCT_ICON,
DEFAULT_DOMAIN_ICON DEFAULT_DOMAIN_ICON,
} from '../../common/IconPicker'; } from '../../common/IconPicker';
import '../domain.less'; import '../domain.less';
import { DomainFormType } from '../DomainPage.interface'; import { DomainFormType } from '../DomainPage.interface';

View File

@ -21,7 +21,7 @@ import {
useEffect, useEffect,
useMemo, useMemo,
useRef, useRef,
useState useState,
} from 'react'; } from 'react';
import { TreeNode } from '../atoms/asyncTreeSelect/types'; import { TreeNode } from '../atoms/asyncTreeSelect/types';
import { useAsyncTreeSelect } from '../atoms/asyncTreeSelect/useAsyncTreeSelect'; import { useAsyncTreeSelect } from '../atoms/asyncTreeSelect/useAsyncTreeSelect';
@ -32,7 +32,7 @@ import { TreeSearchInput } from './atoms/TreeSearchInput';
import { import {
useTreeDropdown, useTreeDropdown,
useTreeFocusManagement, useTreeFocusManagement,
useTreeKeyboardNavigation useTreeKeyboardNavigation,
} from './hooks'; } from './hooks';
import { MUIAsyncTreeSelectProps } from './MUIAsyncTreeSelect.interface'; import { MUIAsyncTreeSelectProps } from './MUIAsyncTreeSelect.interface';

View File

@ -21,7 +21,7 @@ import {
useEffect, useEffect,
useMemo, useMemo,
useRef, useRef,
useState useState,
} from 'react'; } from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { TagSource } from '../../../generated/entity/data/container'; import { TagSource } from '../../../generated/entity/data/container';

View File

@ -24,11 +24,11 @@ import { EntityReference } from '../../../generated/entity/type';
import { searchData } from '../../../rest/miscAPI'; import { searchData } from '../../../rest/miscAPI';
import { import {
formatTeamsResponse, formatTeamsResponse,
formatUsersResponse formatUsersResponse,
} from '../../../utils/APIUtils'; } from '../../../utils/APIUtils';
import { import {
getEntityName, getEntityName,
getEntityReferenceFromEntity getEntityReferenceFromEntity,
} from '../../../utils/EntityUtils'; } from '../../../utils/EntityUtils';
import { ProfilePicture } from '../atoms/ProfilePicture'; import { ProfilePicture } from '../atoms/ProfilePicture';

View File

@ -60,9 +60,8 @@ export const useDrawerBody = (config: DrawerBodyConfig = {}) => {
<Box <Box
sx={{ sx={{
flex: 1, flex: 1,
overflow: 'auto',
p: padding,
position: 'relative', position: 'relative',
overflow: 'hidden',
...sx, ...sx,
}}> }}>
{loading && ( {loading && (
@ -78,7 +77,7 @@ export const useDrawerBody = (config: DrawerBodyConfig = {}) => {
alignItems: 'center', alignItems: 'center',
justifyContent: 'center', justifyContent: 'center',
backgroundColor: 'rgba(255, 255, 255, 0.8)', backgroundColor: 'rgba(255, 255, 255, 0.8)',
zIndex: 1, zIndex: 1000,
}}> }}>
<CircularProgress /> <CircularProgress />
{loadingMessage && ( {loadingMessage && (
@ -88,8 +87,15 @@ export const useDrawerBody = (config: DrawerBodyConfig = {}) => {
)} )}
</Box> </Box>
)} )}
<Box
sx={{
overflow: 'auto',
height: '100%',
p: padding,
}}>
{children} {children}
</Box> </Box>
</Box>
), ),
[children, loading, loadingMessage, padding, sx] [children, loading, loadingMessage, padding, sx]
); );