Skip to content

Commit ea502e2

Browse files
committed
Improve BulkUpdateWithUndoButton props type
1 parent 664417e commit ea502e2

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,11 @@ export const BulkUpdateWithUndoButton = (
2525
data,
2626
label = 'ra.action.update',
2727
icon = defaultIcon,
28-
mutationMode = 'undoable',
2928
onClick,
3029
...rest
3130
} = props;
3231

33-
const { handleUpdate, isPending } = useBulkUpdateController({
34-
...rest,
35-
mutationMode,
36-
});
32+
const { handleUpdate, isPending } = useBulkUpdateController(rest);
3733

3834
const handleClick = e => {
3935
handleUpdate(data);
@@ -67,7 +63,10 @@ export interface BulkUpdateWithUndoButtonProps<
6763
RecordType extends RaRecord = any,
6864
MutationOptionsError = unknown,
6965
> extends ButtonProps,
70-
UseBulkUpdateControllerParams<RecordType, MutationOptionsError> {
66+
Omit<
67+
UseBulkUpdateControllerParams<RecordType, MutationOptionsError>,
68+
'mutationMode'
69+
> {
7170
icon?: React.ReactNode;
7271
data: any;
7372
}

0 commit comments

Comments
 (0)