diff --git a/packages/ra-ui-materialui/src/button/DeleteWithConfirmButton.js b/packages/ra-ui-materialui/src/button/DeleteWithConfirmButton.js index 64bb0577f0e..516236f6ece 100644 --- a/packages/ra-ui-materialui/src/button/DeleteWithConfirmButton.js +++ b/packages/ra-ui-materialui/src/button/DeleteWithConfirmButton.js @@ -98,16 +98,12 @@ const DeleteWithConfirmButton = ({ e.stopPropagation(); }; - const handleDelete = useCallback( - event => { - event.stopPropagation(); - deleteOne(); - if (typeof onClick === 'function') { - onClick(); - } - }, - [deleteOne, onClick] - ); + const handleDelete = useCallback(() => { + deleteOne(); + if (typeof onClick === 'function') { + onClick(); + } + }, [deleteOne, onClick]); return (