Here's a custom delete button showing you how to access data for the record being deleted to customise the dialog:
import React from 'react';
import { DeleteButton } from 'react-admin';
const CustomDeleteButton = ({ type = 'Item', field, ...props }) => {
const { record } = props;
return (
<DeleteButton
confirmTitle={`Delete ${type}: ${field ? record[field] : 'this item'} ?`}
confirmContent={'Are you sure you want to delete this item?'}
{...props}
/>
);
}
export default CustomDeleteButton;
and a sample call to it
<CustomDeleteButton basePath="/customers" undoable={false} type="Customer" field="cus_name" />
Obviously you can tailor this to suit your needs, and extend what information you access from the record object - just make sure you pass all the props on to the DeleteButton!