[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:
Marie
2026-01-27 17:26:14 +01:00
committed by GitHub
parent ddf1c43bb1
commit dd98146c99
2 changed files with 4 additions and 2 deletions
@@ -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,