diff --git a/docs/List.md b/docs/List.md index f77f57b40c6..9038f452b62 100644 --- a/docs/List.md +++ b/docs/List.md @@ -347,6 +347,7 @@ const ResetViewsButton = ({ selectedIds }) => { { notify('ra.notification.deleted', 'info', { smart_count: 1 }); redirect(redirectTo, basePath); @@ -114,6 +114,7 @@ const DeleteWithConfirmButton = ({ ({ */ const Confirm = ({ isOpen, + loading, title, content, confirm, @@ -63,13 +64,11 @@ const Confirm = ({ translateOptions = {}, }) => { const classes = useStyles({ classes: classesOverride }); - const [loading, setLoading] = useState(false); const translate = useTranslate(); const handleConfirm = useCallback( e => { e.stopPropagation(); - setLoading(true); onConfirm(); }, [onConfirm] @@ -126,6 +125,7 @@ Confirm.propTypes = { confirmColor: PropTypes.string.isRequired, content: PropTypes.string.isRequired, isOpen: PropTypes.bool, + loading: PropTypes.bool, onClose: PropTypes.func.isRequired, onConfirm: PropTypes.func.isRequired, title: PropTypes.string.isRequired,