From 2e62bb133bd17b5b5c457d5208ad963947e9f8f9 Mon Sep 17 00:00:00 2001 From: Etienne <45695613+etiennejouan@users.noreply.github.com> Date: Wed, 17 Dec 2025 11:57:30 +0100 Subject: [PATCH] Second Action Button - fix (#16613) Merged https://github.com/twentyhq/twenty/pull/16582 without testing case when fieldDefinition.metadata.settings?.clickAction is not set (default value) To test : When Screenshot 2025-12-17 at 09 37 26 is set (or default) In table view you can copy cell content Screenshot 2025-12-17 at 09 36 58 --- .../hooks/useGetSecondaryRecordTableCellButton.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/hooks/useGetSecondaryRecordTableCellButton.ts b/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/hooks/useGetSecondaryRecordTableCellButton.ts index 3cfa98a335..c5f7d2e36d 100644 --- a/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/hooks/useGetSecondaryRecordTableCellButton.ts +++ b/packages/twenty-front/src/modules/object-record/record-table/record-table-cell/hooks/useGetSecondaryRecordTableCellButton.ts @@ -32,9 +32,12 @@ export const useGetSecondaryRecordTableCellButton = () => { return []; } + const mainActionOnClick = + fieldDefinition.metadata.settings?.clickAction ?? + FieldMetadataSettingsOnClickAction.OPEN_LINK; + const secondaryActionOnClick = - fieldDefinition.metadata.settings?.clickAction === - FieldMetadataSettingsOnClickAction.OPEN_LINK + mainActionOnClick === FieldMetadataSettingsOnClickAction.OPEN_LINK ? FieldMetadataSettingsOnClickAction.COPY : FieldMetadataSettingsOnClickAction.OPEN_LINK;