Entry CRUD

These components and helpers make it easy to use react-admin with ec entries.

entryCrud#

Collection of generic CRUD components for entries. Intended to be used on a Resource using spread syntax:

<Resource name={'muffin'} {...entryCrud} />

contains:

EntryList#

Implements generic List for entries.

  • renders all model fields as a CustomizableDatagrid (according to field config)
  • each field is rendered as a TypeField
  • supports pagination, sorting, filtering + persistent field visibility.
  • supports all field types, except account + roles
  • provides a filter for each filterable field.
  • opens edit on click + has create button action.

EntryEdit#

Implements generic Edit views for a single entry.

  • renders a TypeInput for each field (according to field config)
  • disables readOnly fields
  • currently only limited validation support
  • supports all field types except account, roles and entry/asset fields without validation.
  • contains delete button

EntryCreate#

Like EntryEdit, just for Create, without readOnly fields and without delete button.

EntryShow#

Implements Show view for a single entry.

  • renders field label + TypeField for each field (according to config).

Custom Views#

If you want to replace a generic CRUD view with a custom component, you can override its prop on the desired Resource:

<Resource name={'muffin'} {...entryCrud} list={MuffinList} />

This will render MuffinList as custom list view. Of course, this is possible with any crud prop.

The easiest way to implement a custom view is to copy the generic component and adjust the parts that should be custom. See also: