Fix inline cell height issue and allow field settings update (#11248)
In this PR: - allow to update settings on fields metadata (regression introduced by a recent refactoring of fields-metadata update) - revert changes introduced by https://github.com/twentyhq/twenty/pull/11221
This commit is contained in:
@ -38,6 +38,7 @@ const StyledLabelAndIconContainer = styled.div`
|
||||
display: flex;
|
||||
gap: ${({ theme }) => theme.spacing(1)};
|
||||
height: 18px;
|
||||
padding-top: 3px;
|
||||
`;
|
||||
|
||||
const StyledValueContainer = styled.div`
|
||||
@ -53,16 +54,11 @@ const StyledLabelContainer = styled.div<{ width?: number }>`
|
||||
width: ${({ width }) => width}px;
|
||||
`;
|
||||
|
||||
const StyledInlineCellBaseContainer = styled.div<{
|
||||
isDisplayModeFixHeight?: boolean;
|
||||
}>`
|
||||
const StyledInlineCellBaseContainer = styled.div`
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
line-height: ${({ isDisplayModeFixHeight }) =>
|
||||
isDisplayModeFixHeight ? `24px` : `18px`};
|
||||
height: ${({ isDisplayModeFixHeight }) =>
|
||||
isDisplayModeFixHeight ? `24px` : `18px`};
|
||||
height: fit-content;
|
||||
gap: ${({ theme }) => theme.spacing(1)};
|
||||
user-select: none;
|
||||
align-items: center;
|
||||
@ -74,14 +70,8 @@ export const StyledSkeletonDiv = styled.div`
|
||||
`;
|
||||
|
||||
export const RecordInlineCellContainer = () => {
|
||||
const {
|
||||
readonly,
|
||||
IconLabel,
|
||||
label,
|
||||
labelWidth,
|
||||
showLabel,
|
||||
isDisplayModeFixHeight,
|
||||
} = useRecordInlineCellContext();
|
||||
const { readonly, IconLabel, label, labelWidth, showLabel } =
|
||||
useRecordInlineCellContext();
|
||||
|
||||
const { recordId, fieldDefinition } = useContext(FieldContext);
|
||||
|
||||
@ -111,7 +101,6 @@ export const RecordInlineCellContainer = () => {
|
||||
|
||||
return (
|
||||
<StyledInlineCellBaseContainer
|
||||
isDisplayModeFixHeight={isDisplayModeFixHeight}
|
||||
onMouseEnter={handleContainerMouseEnter}
|
||||
onMouseLeave={handleContainerMouseLeave}
|
||||
>
|
||||
|
||||
@ -44,6 +44,8 @@ const StyledRecordInlineCellNormalModeInnerContainer = styled.div`
|
||||
align-items: center;
|
||||
color: ${({ theme }) => theme.font.color.primary};
|
||||
height: fit-content;
|
||||
padding-top: 3px;
|
||||
padding-bottom: 3px;
|
||||
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
Reference in New Issue
Block a user