Skip to content

Commit 177f15c

Browse files
feat(bulk-update-buttons): added mutation options to bulk update with undo buttons
1 parent f50307f commit 177f15c

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,19 @@ export const BulkUpdateWithUndoButton = (
6262
);
6363
refresh();
6464
},
65+
mutationOptions = {},
6566
...rest
6667
} = props;
68+
const { meta: mutationMeta, ...otherMutationOptions } = mutationOptions;
6769

6870
const [updateMany, { isLoading }] = useUpdateMany(
6971
resource,
70-
{ ids: selectedIds, data },
72+
{ ids: selectedIds, data, meta: mutationMeta },
7173
{
7274
onSuccess,
7375
onError,
7476
mutationMode: 'undoable',
77+
...otherMutationOptions,
7578
}
7679
);
7780

0 commit comments

Comments
 (0)