Skip to content

Commit efffac2

Browse files
authored
Deleted view disable delete btn (#11990)
This PR updates the defaultRecordActionConfig for the SingleRecordActionKeys.DELETE action. A condition !isSoftDeleteFilterActive was added to the shouldBeRegistered function to ensure the delete button is only visible when the deleted records view is not selected. This prevents the delete button from appearing when viewing deleted records. #11974 ![Screenshot 2025-05-12 at 9 41 30 PM](https://github.com/user-attachments/assets/ab7c1f61-d5ab-4315-9f39-50108d11438c) ![Screenshot 2025-05-12 at 9 42 11 PM](https://github.com/user-attachments/assets/82a9843b-4d5e-406c-8186-dce5b7b16bf3)
1 parent 45d4845 commit efffac2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/twenty-front/src/modules/action-menu/actions/record-actions/constants/DefaultRecordActionsConfig.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,10 @@ export const DEFAULT_RECORD_ACTIONS_CONFIG: Record<
180180
Icon: IconTrash,
181181
accent: 'default',
182182
isPinned: true,
183-
shouldBeRegistered: ({ selectedRecord }) =>
184-
isDefined(selectedRecord) && !selectedRecord.isRemote,
183+
shouldBeRegistered: ({ selectedRecord, isSoftDeleteFilterActive }) =>
184+
isDefined(selectedRecord) &&
185+
!selectedRecord.isRemote &&
186+
!isSoftDeleteFilterActive,
185187
availableOn: [
186188
ActionViewType.INDEX_PAGE_SINGLE_RECORD_SELECTION,
187189
ActionViewType.SHOW_PAGE,

0 commit comments

Comments
 (0)