I have successfully removed delete button from datagrid by suppling props bulkActionButtons={false} but Unable to remove delete button from Edit component of react-admin
export const UserEdit = (props) => (
  <Edit {...props}>
    <SimpleForm>
      <TextInput disabled source="id" />
      <TextInput source="email" />
    </SimpleForm>
  </Edit>
);
                You need to overwrite the toolbar component with a toolbar without DeleteButton
import * as React from "react";
import { Edit, SimpleForm, SaveButton, Toolbar } from 'react-admin';
const UserEditToolbar = props => (
    <Toolbar {...props} >
        <SaveButton />
    </Toolbar>
);
export const UserEdit = (props) => (
    <Edit {...props}>
        <SimpleForm toolbar={<UserEditToolbar />}>
            // ...
        </SimpleForm>
    </Edit>
);
Source: https://marmelab.com/react-admin/CreateEdit.html#the-simpleform-component
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With