Skip to content

Commit 44c5259

Browse files
committed
Improve delete button props type.
1 parent 34973a0 commit 44c5259

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packages/ra-ui-materialui/src/button/DeleteButton.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,13 @@ export type DeleteButtonProps<
101101
MutationOptionsError = unknown,
102102
> = SaveContextValue &
103103
(
104-
| DeleteWithUndoButtonProps<RecordType, MutationOptionsError>
105-
| DeleteWithConfirmButtonProps<RecordType, MutationOptionsError>
104+
| ({ mutationMode?: 'undoable' } & DeleteWithUndoButtonProps<
105+
RecordType,
106+
MutationOptionsError
107+
>)
108+
| ({
109+
mutationMode?: 'pessimistic' | 'optimistic';
110+
} & DeleteWithConfirmButtonProps<RecordType, MutationOptionsError>)
106111
);
107112

108113
const PREFIX = 'RaDeleteButton';

0 commit comments

Comments
 (0)