From 6430aca02b07b7d1dfe39277626acbd680975b4e Mon Sep 17 00:00:00 2001 From: dklimpel <5740567+dklimpel@users.noreply.github.com> Date: Mon, 5 Feb 2024 22:23:09 +0100 Subject: [PATCH] Rename save to onSubmit in SimpleForm https: //marmelab.com/react-admin/Upgrade.html#the-form-components-save-prop-has-been-renamed-to-onsubmit Change-Id: Iaf2c0b665c8058336d4df6326531780a2790e71d --- src/components/ServerNotices.js | 8 ++++---- src/components/media.js | 8 ++------ 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/components/ServerNotices.js b/src/components/ServerNotices.js index 45d45b7..f2c8fcb 100644 --- a/src/components/ServerNotices.js +++ b/src/components/ServerNotices.js @@ -23,7 +23,7 @@ import { DialogTitle, } from "@mui/material"; -const ServerNoticeDialog = ({ open, loading, onClose, onSend }) => { +const ServerNoticeDialog = ({ open, loading, onClose, onSubmit }) => { const translate = useTranslate(); const ServerNoticeToolbar = props => ( @@ -50,7 +50,7 @@ const ServerNoticeDialog = ({ open, loading, onClose, onSend }) => { } redirect={false} - onSubmit={onSend} + onSubmit={onSubmit} > { ); @@ -150,7 +150,7 @@ export const ServerNoticeBulkButton = () => { ); diff --git a/src/components/media.js b/src/components/media.js index 9df9ad1..1a4362c 100644 --- a/src/components/media.js +++ b/src/components/media.js @@ -29,7 +29,7 @@ import LockIcon from "@mui/icons-material/Lock"; import LockOpenIcon from "@mui/icons-material/LockOpen"; import { alpha, useTheme } from "@mui/material/styles"; -const DeleteMediaDialog = ({ open, loading, onClose, onSend }) => { +const DeleteMediaDialog = ({ open, loading, onClose, onSubmit }) => { const translate = useTranslate(); const dateParser = v => { @@ -61,11 +61,7 @@ const DeleteMediaDialog = ({ open, loading, onClose, onSend }) => { {translate("resources.delete_media.helper.send")} - } - redirect={false} - save={onSend} - > + } onSubmit={onSubmit}>