Skip to content

Commit

Permalink
relations header button to appear at all times for mobile devices (tw…
Browse files Browse the repository at this point in the history
  • Loading branch information
ehconitin authored Sep 17, 2024
1 parent dcac832 commit 3c306e9
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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,
Expand Down Expand Up @@ -168,7 +170,7 @@ export const RecordDetailRelationSection = ({
}
: undefined
}
hideRightAdornmentOnMouseLeave={!isDropdownOpen}
hideRightAdornmentOnMouseLeave={!isDropdownOpen && !isMobile}
rightAdornment={
<DropdownScope dropdownScopeId={dropdownId}>
<StyledAddDropdown
Expand Down

0 comments on commit 3c306e9

Please sign in to comment.