From 917a36821aabb1d03a976fc3c49ea18830074d42 Mon Sep 17 00:00:00 2001
From: "Abdullah." <125115953+mabdullahabaid@users.noreply.github.com>
Date: Fri, 20 Feb 2026 17:16:49 +0500
Subject: [PATCH] fix: hover appearing on not shared for junction relations
(#18058)
Hovering over "Not Shared" in junction relations shows the placeholder
text.
This PR fixes it.
---
.../components/RecordInlineCellDisplayMode.tsx | 8 ++++++--
.../components/RecordInlineCellValue.tsx | 8 --------
2 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellDisplayMode.tsx b/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellDisplayMode.tsx
index af331be2b0..9b8833db15 100644
--- a/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellDisplayMode.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellDisplayMode.tsx
@@ -1,5 +1,6 @@
import styled from '@emotion/styled';
+import { FieldContext } from '@/object-record/record-field/ui/contexts/FieldContext';
import { useIsFieldEmpty } from '@/object-record/record-field/ui/hooks/useIsFieldEmpty';
import { useIsFieldInputOnly } from '@/object-record/record-field/ui/hooks/useIsFieldInputOnly';
import {
@@ -9,6 +10,7 @@ import {
import { RecordInlineCellButton } from '@/object-record/record-inline-cell/components/RecordInlineCellEditButton';
import { css } from '@emotion/react';
import { useLingui } from '@lingui/react/macro';
+import { useContext } from 'react';
const StyledRecordInlineCellNormalModeOuterContainer = styled.div<
Pick<
@@ -75,6 +77,8 @@ export const RecordInlineCellDisplayMode = ({
const { editModeContentOnly, label, buttonIcon, readonly } =
useRecordInlineCellContext();
+ const { isForbidden } = useContext(FieldContext);
+
const isFieldEmpty = useIsFieldEmpty();
const showEditButton =
buttonIcon &&
@@ -87,9 +91,9 @@ export const RecordInlineCellDisplayMode = ({
const emptyPlaceHolder = label ?? t`Empty`;
- const shouldShowValue = !isFieldEmpty || isFieldInputOnly;
+ const shouldShowValue = !isFieldEmpty || isFieldInputOnly || isForbidden;
- const shouldShowEmptyPlaceholder = isFieldEmpty;
+ const shouldShowEmptyPlaceholder = isFieldEmpty && !isForbidden;
return (
<>
diff --git a/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellValue.tsx b/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellValue.tsx
index ba5dfc37a5..bb84725723 100644
--- a/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellValue.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellValue.tsx
@@ -1,11 +1,8 @@
import { css } from '@emotion/react';
import styled from '@emotion/styled';
-import { useContext } from 'react';
import { FieldDisplay } from '@/object-record/record-field/ui/components/FieldDisplay';
-import { FieldContext } from '@/object-record/record-field/ui/contexts/FieldContext';
import { useFieldFocus } from '@/object-record/record-field/ui/hooks/useFieldFocus';
-import { ForbiddenFieldDisplay } from '@/object-record/record-field/ui/meta-types/display/components/ForbiddenFieldDisplay';
import { useRecordInlineCellContext } from '@/object-record/record-inline-cell/components/RecordInlineCellContext';
import { RecordInlineCellDisplayMode } from '@/object-record/record-inline-cell/components/RecordInlineCellDisplayMode';
import { RecordInlineCellSkeletonLoader } from '@/object-record/record-inline-cell/components/RecordInlineCellSkeletonLoader';
@@ -36,16 +33,11 @@ export const RecordInlineCellValue = () => {
const { readonly, loading, isCentered, onOpenEditMode } =
useRecordInlineCellContext();
const { isFocused } = useFieldFocus();
- const { isForbidden } = useContext(FieldContext);
if (loading === true) {
return ;
}
- if (isForbidden === true) {
- return ;
- }
-
return (