前端项目实战叁佰陆拾玖react-admin和material ui-create行内按钮编辑
<Datagrid sx={{ width: '100%' }}
bulkActionButtons={<BulkDeleteButton mutationMode='pessimistic' />}
rowClick={handleRowClick}
>
<TextField source='id' />
<TextField source='code' />
<TextField source='category_name' />
<ReferenceManyCount
label="style"
reference="t_prod_style"
target='category_id'
link
/>
<ShowRecordButton />
</Datagrid>
const handleRowClick = (id: Identifier, resource: string, record: RaRecord): false => {
url = url + `/${id}`;
redirect(url);
return false;
}
运行结果


浙公网安备 33010602011771号