Closed
Description
Description
The new DataGrid component is a major improvement over the Datatable.
Let's make FieldGuesser
and related components are compatible.
Example
The component does not use introspection of direct child elements anymore, so that makes rendering and supporting elements like buttons in the table way more flexible.
--- a/pwa/components/admin/domain/Foo.tsx
+++ b/pwa/components/admin/domain/Foo.tsx
@@ -8,7 +8,7 @@
ShowGuesser
} from "@api-platform/admin";
import {
- Datagrid,
+ DataTable,
DateField,
EditButton,
ReferenceManyField,
@@ -146,10 +146,12 @@
</TabbedShowLayout.Tab>
<TabbedShowLayout.Tab label="foo">
<ReferenceManyField reference="foo" target="bar">
- <Datagrid>
- <TextField source="name"/>
- <EditButton/>
- </Datagrid>
+ <DataTable>
+ <FieldGuesser source="name" />
+ <DataTable.Col>
+ <EditButton/>
+ </DataTable.Col>
+ </DataTable>
</ReferenceManyField>
</TabbedShowLayout.Tab>
Metadata
Metadata
Assignees
Labels
No labels