Skip to content

EditButton

Link button to the edit page of the current record.

Use it inside a RecordContext, for example in the actions of a <Show> view, or in the rows of a <DataTable>.

import { DataTable, EditButton } from '@/components/admin';
const PostList = () => (
<DataTable>
<DataTable.Col source="title" />
<DataTable.Col source="author" />
<DataTable.Col source="published_at" />
<DataTable.Col>
<EditButton />
</DataTable.Col>
</DataTable>
);
PropRequiredTypeDefaultDescription
labelOptionalstringra.action.editi18n key / label
recordOptionalRaRecordFrom contextRecord used for id
resourceOptionalstringFrom contextResource name