Cleaned FieldDefinition props and removed recoil calls (#14220)
This PR removes some unused props from FieldDefinition type and put some recoil calls higher up in the hierarchy. This PR fixes a regression on Chip introduced by https://github.com/twentyhq/twenty/pull/11498, where we don't want "Untitled" to be displayed in compact mode. # FieldDefinition refactor Removed `isLabelIdentifierCompact` and `labelIdentifierLink` which can be derived directly in the chip component or computed in the record table context. Removed `disableTooltip` and `infoTooltipContent` because they were not used. Introduced `fieldMetadataItemId`, as optional for now, to have the ability to progressively refactor the different things that could be derived from this and `recordId`. # Performance improvements There's not a great deal to be gained for now on those modifications, which specifically concern the identifier column.
This commit is contained in:
@@ -166,7 +166,7 @@ export const Chip = ({
|
||||
{leftComponent}
|
||||
{!isLabelHidden && label && label.trim() ? (
|
||||
<OverflowingTextWithTooltip size={size} text={label} />
|
||||
) : !forceEmptyText ? (
|
||||
) : !forceEmptyText && !isLabelHidden ? (
|
||||
<StyledDiv>Untitled</StyledDiv>
|
||||
) : (
|
||||
''
|
||||
|
||||
Reference in New Issue
Block a user