Skip to content

Commit 9d33028

Browse files
authored
Add more migraton tips
1 parent 0947b7c commit 9d33028

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

docs/DataTable.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1876,6 +1876,7 @@ Here is what the codemod will transform for you:
18761876

18771877
- Replace `<Datagrid>` with `<DataTable>`.
18781878
- Replace `rowStyle` with `rowSx`.
1879+
- Remove the `optimized` prop (which isn't necessary anymore)
18791880
- Rename the keys in `sx` prop from `"& .RaDatagrid-xxxx"` to `"& .RaDataTable-xxxx"`.
18801881
- Replace simple `<TextField>` with `<DataTable.Col>`.
18811882
- Replace simple `<NumberField>` with `<DataTable.NumberCol>`.
@@ -1884,5 +1885,9 @@ Here is what the codemod will transform for you:
18841885

18851886
However, the codemod will **not**:
18861887

1887-
- Replace `<DatagridConfigurable>`.
1888+
- Replace `<DatagridConfigurable>` with `<DataTable>` (column selection is now natively supported by `<DataTable>`).
1889+
- Remove the `sortBy` and `sortable` props on fields (sorting is now managed by `<DataTable.Col source>`)
1890+
- Move the `sortByOrder` prop from the field to `<DataTable.Col>`
1891+
- Replace a `<FunctionField>` child with `<DataTable.Col render>`
18881892
- Replace `<Datagrid>` from `@react-admin/ra-rbac` (and all its children). Refer to [Access Control section](#access-control) to use `<DataTable>` with `<CanAccess>`.
1893+
- Move the column styles from `<Datagrid sx>` to the individual `<DataTable.Col sx>`

0 commit comments

Comments
 (0)