relations header button to appear at all times for mobile devices (#7044)

fixes #7036
This commit is contained in:
nitin 2024-09-17 15:21:13 +05:30 committed by GitHub
parent dcac832616
commit 3c306e9be8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -30,6 +30,7 @@ import { LightIconButton } from '@/ui/input/button/components/LightIconButton';
import { Dropdown } from '@/ui/layout/dropdown/components/Dropdown';
import { useDropdown } from '@/ui/layout/dropdown/hooks/useDropdown';
import { DropdownScope } from '@/ui/layout/dropdown/scopes/DropdownScope';
import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';
import { FilterQueryParams } from '@/views/hooks/internal/useViewFromQueryParams';
import { ViewFilterOperand } from '@/views/types/ViewFilterOperand';
import { RelationDefinitionType } from '~/generated-metadata/graphql';
@ -54,6 +55,7 @@ export const RecordDetailRelationSection = ({
} = fieldDefinition.metadata as FieldRelationMetadata;
const record = useRecoilValue(recordStoreFamilyState(recordId));
const isMobile = useIsMobile();
const { objectMetadataItem: relationObjectMetadataItem } =
useObjectMetadataItem({
objectNameSingular: relationObjectMetadataNameSingular,
@ -168,7 +170,7 @@ export const RecordDetailRelationSection = ({
}
: undefined
}
hideRightAdornmentOnMouseLeave={!isDropdownOpen}
hideRightAdornmentOnMouseLeave={!isDropdownOpen && !isMobile}
rightAdornment={
<DropdownScope dropdownScopeId={dropdownId}>
<StyledAddDropdown