[Fix] display current object label in morph relation picker after rename 2/2 (#17484)
Following https://github.com/twentyhq/twenty/pull/17209 The goal is to display the updated label. For SingleRecordPickerMenuItemsWithSearch, we did it in two parts to avoid the breaking change by calling `objectLabelSingular` after its addition has been deployed to prod <img width="410" height="295" alt="image" src="https://github.com/user-attachments/assets/d6014391-b943-4fdb-a15f-e62717463d74" />
This commit is contained in:
+1
-1
@@ -85,7 +85,7 @@ export const SingleRecordPickerMenuItem = ({
|
||||
}
|
||||
contextualText={
|
||||
showObjectName
|
||||
? capitalize(searchRecord.objectNameSingular)
|
||||
? capitalize(searchRecord.objectLabelSingular)
|
||||
: undefined
|
||||
}
|
||||
/>
|
||||
|
||||
@@ -453,7 +453,9 @@ export class SearchService {
|
||||
return {
|
||||
recordId: record.id,
|
||||
objectNameSingular: objectMetadataItem.nameSingular,
|
||||
objectLabelSingular: objectMetadataItem.labelSingular,
|
||||
objectLabelSingular:
|
||||
objectMetadataItem.standardOverrides?.labelSingular ??
|
||||
objectMetadataItem.labelSingular,
|
||||
label: this.getLabelIdentifierValue(
|
||||
record,
|
||||
objectMetadataItem,
|
||||
|
||||
Reference in New Issue
Block a user