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:
@@ -39,7 +39,6 @@ export const mapViewFieldsToColumnDefinitions = ({
|
||||
fieldMetadataId: viewField.fieldMetadataId,
|
||||
label: correspondingColumnDefinition.label,
|
||||
metadata: correspondingColumnDefinition.metadata,
|
||||
infoTooltipContent: correspondingColumnDefinition.infoTooltipContent,
|
||||
iconName: correspondingColumnDefinition.iconName,
|
||||
type: correspondingColumnDefinition.type,
|
||||
position: isLabelIdentifier ? 0 : viewField.position,
|
||||
|
||||
Reference in New Issue
Block a user