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  
This commit is contained in:
@ -180,8 +180,10 @@ export const DEFAULT_RECORD_ACTIONS_CONFIG: Record<
|
||||
Icon: IconTrash,
|
||||
accent: 'default',
|
||||
isPinned: true,
|
||||
shouldBeRegistered: ({ selectedRecord }) =>
|
||||
isDefined(selectedRecord) && !selectedRecord.isRemote,
|
||||
shouldBeRegistered: ({ selectedRecord, isSoftDeleteFilterActive }) =>
|
||||
isDefined(selectedRecord) &&
|
||||
!selectedRecord.isRemote &&
|
||||
!isSoftDeleteFilterActive,
|
||||
availableOn: [
|
||||
ActionViewType.INDEX_PAGE_SINGLE_RECORD_SELECTION,
|
||||
ActionViewType.SHOW_PAGE,
|
||||
|
||||
Reference in New Issue
Block a user