From 1f65aa80effd386ac870207f19d7068801d656d3 Mon Sep 17 00:00:00 2001 From: Alican Erdurmaz Date: Fri, 15 Nov 2024 10:31:49 +0300 Subject: [PATCH] feat: update @mui/x-data-grid to 7 --- ...-admin-panel-with-materialui-and-strapi.md | 2 +- .../blog/2022-08-23-mui-usedatagrid.md | 11 +- .../blog/2022-12-23-dynamic-hook-form.md | 2 +- .../docs/getting-started/example/sandpack.tsx | 8 +- .../authentication/auth-pages/mui.tsx | 2 +- .../forms/server-side-validation-mui.tsx | 2 +- .../general-concepts/auth-pages/mui.tsx | 2 +- .../general-concepts/layout/mui.tsx | 5 +- .../components/basic-views/create/index.md | 4 +- .../components/basic-views/edit/index.md | 5 +- .../components/basic-views/list/index.md | 4 +- .../components/basic-views/show/index.md | 5 +- .../components/buttons/clone-button/index.md | 3 +- .../components/buttons/create-button/index.md | 2 +- .../components/buttons/delete-button/index.md | 3 +- .../components/buttons/edit-button/index.md | 3 +- .../components/buttons/export-button/index.md | 2 +- .../components/buttons/import-button/index.md | 2 +- .../components/buttons/show-button/index.md | 3 +- .../components/fields/boolean-field/index.md | 3 +- .../components/fields/date-field/index.md | 3 +- .../components/fields/email-field/index.md | 3 +- .../components/fields/file-field/index.md | 3 +- .../components/fields/number-field/index.md | 3 +- .../components/fields/tag-field/index.md | 3 +- .../components/fields/text-field/index.md | 3 +- .../components/fields/url-field/index.md | 3 +- ...-use-data-grid-basic-usage-live-preview.md | 2 +- ...l-use-data-grid-relational-live-preview.md | 13 +- .../material-ui/hooks/use-data-grid/index.md | 14 +- .../material-ui/introduction/index.md | 5 +- .../introduction/previews/auth-page.tsx | 4 +- .../introduction/previews/basic-views.tsx | 5 +- .../introduction/previews/example.tsx | 5 +- .../introduction/previews/layout-next-js.tsx | 4 +- .../previews/layout-react-router-dom.tsx | 4 +- .../introduction/previews/layout-remix.tsx | 4 +- .../introduction/previews/theming.tsx | 5 +- .../introduction/previews/usage-next-js.tsx | 5 +- .../previews/usage-react-router-dom.tsx | 5 +- .../introduction/previews/usage-remix.tsx | 5 +- .../material-ui/migration-guide/index.md | 2 +- .../material-ui/theming/index.md | 5 +- .../material-ui/react-router/index.md | 8 +- .../material-ui/react-router/sandpack.tsx | 6 +- .../material-ui/react-router/sandpack.tsx | 2 +- .../material-ui/react-router/index.md | 10 +- .../material-ui/react-router/sandpack.tsx | 10 +- examples/auth-material-ui/package.json | 2 +- .../auth-material-ui/src/pages/posts/list.tsx | 12 +- examples/base-material-ui/package.json | 2 +- .../base-material-ui/src/pages/posts/list.tsx | 12 +- .../blog-material-ui-datagrid/package.json | 2 +- .../src/pages/employees.tsx | 5 +- examples/blog-material-ui/package.json | 2 +- .../blog-material-ui/src/pages/posts/list.tsx | 5 +- .../blog-react-hook-dynamic-form/package.json | 2 +- .../src/pages/userList.tsx | 3 +- examples/blog-refine-mui/package.json | 2 +- .../src/components/recent-sales/index.tsx | 9 +- .../src/pages/categories/list.tsx | 3 +- .../src/pages/products/list.tsx | 8 +- .../blog-refine-react-hook-form/package.json | 2 +- .../package.json | 2 +- .../src/pages/posts/list.tsx | 4 +- .../package.json | 2 +- .../src/pages/posts/list.tsx | 4 +- examples/finefoods-material-ui/package.json | 2 +- .../courier/table-reviews/index.tsx | 19 +- .../dashboard/recentOrders/index.tsx | 4 + .../src/components/order/products/index.tsx | 5 +- .../components/product/list-table/index.tsx | 8 +- .../components/store/courier-table/index.tsx | 6 +- .../src/components/store/table/index.tsx | 22 +- .../src/pages/categories/list.tsx | 12 +- .../src/pages/couriers/list.tsx | 18 +- .../src/pages/customers/list.tsx | 23 +- .../src/pages/customers/show.tsx | 16 +- .../src/pages/orders/list.tsx | 38 +- .../src/pages/products/list.tsx | 5 +- .../package.json | 2 +- .../src/pages/posts/list.tsx | 5 +- .../package.json | 2 +- .../src/pages/posts/list.tsx | 4 +- .../form-material-ui-use-form/package.json | 2 +- .../src/pages/posts/list.tsx | 4 +- .../package.json | 2 +- .../src/pages/posts/list.tsx | 4 +- .../package.json | 2 +- .../src/pages/posts/list.tsx | 4 +- .../import-export-material-ui/package.json | 2 +- .../src/pages/list.tsx | 3 +- examples/inferencer-material-ui/package.json | 2 +- examples/mern-dashboard-client/package.json | 2 +- examples/refine-hr-ce/package.json | 2 +- .../package.json | 2 +- .../src/pages/posts/list.tsx | 2 + .../table-material-ui-advanced/package.json | 2 +- .../src/pages/dataGrid/index.tsx | 8 +- .../package.json | 2 +- .../src/pages/posts/list.tsx | 4 +- .../package.json | 4 +- .../src/pages/posts/list.tsx | 8 +- .../package.json | 2 +- .../src/pages/posts/list.tsx | 3 +- .../package.json | 2 +- .../src/pages/posts/list.tsx | 13 +- .../package.json | 2 +- .../src/pages/posts/list.tsx | 8 +- .../package.json | 2 +- .../src/pages/posts/list.tsx | 8 +- examples/template-material-ui/package.json | 2 +- examples/theme-material-ui-demo/package.json | 2 +- .../src/pages/posts/list.tsx | 4 +- examples/tutorial-material-ui/package.json | 2 +- .../src/pages/blog-posts/list.tsx | 8 +- .../upload-material-ui-base64/package.json | 2 +- .../src/pages/posts/list.tsx | 4 +- .../upload-material-ui-multipart/package.json | 2 +- .../src/pages/posts/list.tsx | 4 +- examples/with-material-ui-vite/package.json | 2 +- .../src/pages/blog-posts/list.tsx | 8 +- .../src/pages/categories/list.tsx | 3 +- examples/with-remix-material-ui/package.json | 2 +- packages/chakra-ui/README.md | 2 + packages/codemod/test/list.tsx | 2 +- packages/core/README.md | 4 +- packages/inferencer/package.json | 2 +- .../inferencer/src/inferencers/mui/list.tsx | 16 +- packages/live-previews/package.json | 2 +- packages/mantine/README.md | 2 + packages/mui/README.md | 4 +- packages/mui/package.json | 4 +- packages/mui/src/hooks/useDataGrid/index.ts | 22 +- pnpm-lock.yaml | 409 ++++++++---------- 135 files changed, 548 insertions(+), 558 deletions(-) diff --git a/documentation/blog/2022-07-21-admin-panel-with-materialui-and-strapi.md b/documentation/blog/2022-07-21-admin-panel-with-materialui-and-strapi.md index 67d40664660e..e002e3703774 100644 --- a/documentation/blog/2022-07-21-admin-panel-with-materialui-and-strapi.md +++ b/documentation/blog/2022-07-21-admin-panel-with-materialui-and-strapi.md @@ -190,7 +190,7 @@ export const PostList: React.FC = () => { return ( - + ); }; diff --git a/documentation/blog/2022-08-23-mui-usedatagrid.md b/documentation/blog/2022-08-23-mui-usedatagrid.md index 1e6d69838e71..ed70ca5e100b 100644 --- a/documentation/blog/2022-08-23-mui-usedatagrid.md +++ b/documentation/blog/2022-08-23-mui-usedatagrid.md @@ -214,8 +214,7 @@ const EmployeeList: React.FC = () => { headerName: "Full Name", minWidth: 150, flex: 1, - valueGetter: (params) => - `${params.row.first_name || ""} ${params.row.last_name || ""}`, + valueGetter: (_, row) => `${first_name || ""} ${last_name || ""}`, }, { field: "email", @@ -482,8 +481,8 @@ const EmployeeList: React.FC = () => { headerName: "Full Name", minWidth: 150, flex: 1, - valueGetter: (params) => - `${params.row.first_name || ""} ${params.row.last_name || ""}`, + valueGetter: (_, row) => + `${row.first_name || ""} ${row.last_name || ""}`, }, { field: "email", @@ -653,8 +652,8 @@ const EmployeeList: React.FC = () => { headerName: "Full Name", minWidth: 150, flex: 1, - valueGetter: (params) => - `${params.row.first_name || ""} ${params.row.last_name || ""}`, + valueGetter: (_, row) => + `${row.first_name || ""} ${row.last_name || ""}`, }, { field: "email", diff --git a/documentation/blog/2022-12-23-dynamic-hook-form.md b/documentation/blog/2022-12-23-dynamic-hook-form.md index 9eb7e92a6035..b0a5eb4152fa 100644 --- a/documentation/blog/2022-12-23-dynamic-hook-form.md +++ b/documentation/blog/2022-12-23-dynamic-hook-form.md @@ -231,7 +231,7 @@ Finally, declare the `` component within the `List` component and add return ( - + ); ``` diff --git a/documentation/docs/getting-started/example/sandpack.tsx b/documentation/docs/getting-started/example/sandpack.tsx index 5b3865bf6451..e87c3766fd3e 100644 --- a/documentation/docs/getting-started/example/sandpack.tsx +++ b/documentation/docs/getting-started/example/sandpack.tsx @@ -873,6 +873,7 @@ export const ProductList = () => { const value = row?.category; return value; }, + display: "flex", renderCell: function render({ value }) { return categoryLoading ? ( <>{translate("loading")} @@ -888,6 +889,7 @@ export const ProductList = () => { headerName: translate("products.fields.price"), minWidth: 100, maxWidth: 150, + display: "flex", renderCell: ({ value }) => { return ( { field: "actions", headerName: translate("table.actions"), sortable: false, + display: "flex", renderCell: function render({ row }) { return ( <> @@ -921,7 +924,7 @@ export const ProductList = () => { return ( - + ); }; @@ -1171,6 +1174,7 @@ export const CategoryList: React.FC = () => { field: "actions", headerName: translate("table.actions"), sortable: false, + display: "flex", renderCell: function render({ row }) { return ( <> @@ -1190,7 +1194,7 @@ export const CategoryList: React.FC = () => { return ( - + ); }; diff --git a/documentation/docs/guides-concepts/authentication/auth-pages/mui.tsx b/documentation/docs/guides-concepts/authentication/auth-pages/mui.tsx index 39daea53ee46..b457b674efe4 100644 --- a/documentation/docs/guides-concepts/authentication/auth-pages/mui.tsx +++ b/documentation/docs/guides-concepts/authentication/auth-pages/mui.tsx @@ -19,7 +19,7 @@ export function MaterialUIAuth() { "@mui/lab": "^6.0.0-beta.14", "@mui/material": "^6.1.6", "@mui/system": "latest", - "@mui/x-data-grid": "^6.6.0", + "@mui/x-data-grid": "^7.22.2", }} startRoute="/login" files={{ diff --git a/documentation/docs/guides-concepts/forms/server-side-validation-mui.tsx b/documentation/docs/guides-concepts/forms/server-side-validation-mui.tsx index 9bebe06af8de..69b79c45b8e7 100644 --- a/documentation/docs/guides-concepts/forms/server-side-validation-mui.tsx +++ b/documentation/docs/guides-concepts/forms/server-side-validation-mui.tsx @@ -17,7 +17,7 @@ export default function ServerSideValidationMui() { "@mui/lab": "^6.0.0-beta.14", "@mui/material": "^6.1.6", "@mui/system": "latest", - "@mui/x-data-grid": "^6.6.0", + "@mui/x-data-grid": "^7.22.2", "react-router-dom": "latest", "react-router": "latest", "react-hook-form": "^7.43.5", diff --git a/documentation/docs/guides-concepts/general-concepts/auth-pages/mui.tsx b/documentation/docs/guides-concepts/general-concepts/auth-pages/mui.tsx index 39daea53ee46..b457b674efe4 100644 --- a/documentation/docs/guides-concepts/general-concepts/auth-pages/mui.tsx +++ b/documentation/docs/guides-concepts/general-concepts/auth-pages/mui.tsx @@ -19,7 +19,7 @@ export function MaterialUIAuth() { "@mui/lab": "^6.0.0-beta.14", "@mui/material": "^6.1.6", "@mui/system": "latest", - "@mui/x-data-grid": "^6.6.0", + "@mui/x-data-grid": "^7.22.2", }} startRoute="/login" files={{ diff --git a/documentation/docs/guides-concepts/general-concepts/layout/mui.tsx b/documentation/docs/guides-concepts/general-concepts/layout/mui.tsx index 38e0c10b515b..d84c9ea19ea8 100644 --- a/documentation/docs/guides-concepts/general-concepts/layout/mui.tsx +++ b/documentation/docs/guides-concepts/general-concepts/layout/mui.tsx @@ -20,7 +20,7 @@ export function MaterialUILayout() { "@mui/lab": "^6.0.0-beta.14", "@mui/material": "^6.1.6", "@mui/system": "latest", - "@mui/x-data-grid": "^6.6.0", + "@mui/x-data-grid": "^7.22.2", }} startRoute="/my-products" files={{ @@ -133,6 +133,7 @@ export const ProductList = () => { field: "actions", headerName: "Actions", sortable: false, + display: "flex", renderCell: function render({ row }) { return ( <> @@ -150,7 +151,7 @@ export const ProductList = () => { return ( - + ); }; diff --git a/documentation/docs/ui-integrations/material-ui/components/basic-views/create/index.md b/documentation/docs/ui-integrations/material-ui/components/basic-views/create/index.md index 0fc3ac07dec4..bab26cdc174c 100644 --- a/documentation/docs/ui-integrations/material-ui/components/basic-views/create/index.md +++ b/documentation/docs/ui-integrations/material-ui/components/basic-views/create/index.md @@ -864,6 +864,7 @@ const SampleList = () => { return value; }, minWidth: 300, + display: "flex", renderCell: function render({ value }) { return categoryIsLoading ? ( <>Loading... @@ -876,6 +877,7 @@ const SampleList = () => { field: "createdAt", headerName: "Created At", minWidth: 250, + display: "flex", renderCell: function render({ value }) { return ; }, @@ -886,7 +888,7 @@ const SampleList = () => { return ( - + ); }; diff --git a/documentation/docs/ui-integrations/material-ui/components/basic-views/edit/index.md b/documentation/docs/ui-integrations/material-ui/components/basic-views/edit/index.md index df0ffbf0704e..65e6b74745ff 100644 --- a/documentation/docs/ui-integrations/material-ui/components/basic-views/edit/index.md +++ b/documentation/docs/ui-integrations/material-ui/components/basic-views/edit/index.md @@ -1383,6 +1383,7 @@ const SampleList = () => { return value; }, minWidth: 300, + display: "flex", renderCell: function render({ value }) { return categoryIsLoading ? ( <>Loading... @@ -1395,6 +1396,7 @@ const SampleList = () => { field: "createdAt", headerName: "Created At", minWidth: 250, + display: "flex", renderCell: function render({ value }) { return ; }, @@ -1402,6 +1404,7 @@ const SampleList = () => { { field: "actions", headerName: "Actions", + display: "flex", renderCell: function render({ row }) { return ( <> @@ -1419,7 +1422,7 @@ const SampleList = () => { return ( - + ); }; diff --git a/documentation/docs/ui-integrations/material-ui/components/basic-views/list/index.md b/documentation/docs/ui-integrations/material-ui/components/basic-views/list/index.md index 20a8491c5850..66852db1fa22 100644 --- a/documentation/docs/ui-integrations/material-ui/components/basic-views/list/index.md +++ b/documentation/docs/ui-integrations/material-ui/components/basic-views/list/index.md @@ -47,6 +47,7 @@ const SampleList = () => { return value; }, minWidth: 300, + display: "flex", renderCell: function render({ value }) { return categoryIsLoading ? ( <>Loading... @@ -59,6 +60,7 @@ const SampleList = () => { field: "createdAt", headerName: "Created At", minWidth: 250, + display: "flex", renderCell: function render({ value }) { return ; }, @@ -69,7 +71,7 @@ const SampleList = () => { return ( - + ); }; diff --git a/documentation/docs/ui-integrations/material-ui/components/basic-views/show/index.md b/documentation/docs/ui-integrations/material-ui/components/basic-views/show/index.md index 48761ecb83fa..30cbc10d32be 100644 --- a/documentation/docs/ui-integrations/material-ui/components/basic-views/show/index.md +++ b/documentation/docs/ui-integrations/material-ui/components/basic-views/show/index.md @@ -998,6 +998,7 @@ const SampleList = () => { return value; }, minWidth: 300, + display: "flex", renderCell: function render({ value }) { return categoryIsLoading ? ( <>Loading... @@ -1010,6 +1011,7 @@ const SampleList = () => { field: "createdAt", headerName: "Created At", minWidth: 250, + display: "flex", renderCell: function render({ value }) { return ; }, @@ -1017,6 +1019,7 @@ const SampleList = () => { { field: "actions", headerName: "Actions", + display: "flex", renderCell: function render({ row }) { return ( <> @@ -1034,7 +1037,7 @@ const SampleList = () => { return ( - + ); }; diff --git a/documentation/docs/ui-integrations/material-ui/components/buttons/clone-button/index.md b/documentation/docs/ui-integrations/material-ui/components/buttons/clone-button/index.md index 29e9bd747844..cd06101f2eff 100644 --- a/documentation/docs/ui-integrations/material-ui/components/buttons/clone-button/index.md +++ b/documentation/docs/ui-integrations/material-ui/components/buttons/clone-button/index.md @@ -31,6 +31,7 @@ const columns: GridColDef[] = [ { field: "actions", headerName: "Actions", + display: "flex", renderCell: function render({ row }) { // highlight-next-line return ; @@ -46,7 +47,7 @@ const PostsList: React.FC = () => { return ( - + ); }; diff --git a/documentation/docs/ui-integrations/material-ui/components/buttons/create-button/index.md b/documentation/docs/ui-integrations/material-ui/components/buttons/create-button/index.md index e96aa161a0b3..812db2a03364 100644 --- a/documentation/docs/ui-integrations/material-ui/components/buttons/create-button/index.md +++ b/documentation/docs/ui-integrations/material-ui/components/buttons/create-button/index.md @@ -35,7 +35,7 @@ const PostsList: React.FC = () => { return ( // highlight-next-line }> - + ); }; diff --git a/documentation/docs/ui-integrations/material-ui/components/buttons/delete-button/index.md b/documentation/docs/ui-integrations/material-ui/components/buttons/delete-button/index.md index c7af99f7b22d..0277d338eafc 100644 --- a/documentation/docs/ui-integrations/material-ui/components/buttons/delete-button/index.md +++ b/documentation/docs/ui-integrations/material-ui/components/buttons/delete-button/index.md @@ -33,6 +33,7 @@ const columns: GridColDef[] = [ { field: "actions", headerName: "Actions", + display: "flex", renderCell: function render({ row }) { // highlight-next-line return ; @@ -48,7 +49,7 @@ const PostsList: React.FC = () => { return ( - + ); }; diff --git a/documentation/docs/ui-integrations/material-ui/components/buttons/edit-button/index.md b/documentation/docs/ui-integrations/material-ui/components/buttons/edit-button/index.md index 63e34ed4a1d2..95a98b9e3c21 100644 --- a/documentation/docs/ui-integrations/material-ui/components/buttons/edit-button/index.md +++ b/documentation/docs/ui-integrations/material-ui/components/buttons/edit-button/index.md @@ -29,6 +29,7 @@ const columns: GridColDef[] = [ { field: "actions", headerName: "Actions", + display: "flex", renderCell: function render({ row }) { // highlight-next-line return ; @@ -44,7 +45,7 @@ const PostsList: React.FC = () => { return ( - + ); }; diff --git a/documentation/docs/ui-integrations/material-ui/components/buttons/export-button/index.md b/documentation/docs/ui-integrations/material-ui/components/buttons/export-button/index.md index 75b57f74afe4..304aa438d1b1 100644 --- a/documentation/docs/ui-integrations/material-ui/components/buttons/export-button/index.md +++ b/documentation/docs/ui-integrations/material-ui/components/buttons/export-button/index.md @@ -46,7 +46,7 @@ const PostsList: React.FC = () => { } // highlight-end > - + ); }; diff --git a/documentation/docs/ui-integrations/material-ui/components/buttons/import-button/index.md b/documentation/docs/ui-integrations/material-ui/components/buttons/import-button/index.md index 4c59d9852e37..209f2f553134 100644 --- a/documentation/docs/ui-integrations/material-ui/components/buttons/import-button/index.md +++ b/documentation/docs/ui-integrations/material-ui/components/buttons/import-button/index.md @@ -46,7 +46,7 @@ const PostsList: React.FC = () => { } // highlight-end > - + ); }; diff --git a/documentation/docs/ui-integrations/material-ui/components/buttons/show-button/index.md b/documentation/docs/ui-integrations/material-ui/components/buttons/show-button/index.md index 995882132b51..be34033efa42 100644 --- a/documentation/docs/ui-integrations/material-ui/components/buttons/show-button/index.md +++ b/documentation/docs/ui-integrations/material-ui/components/buttons/show-button/index.md @@ -29,6 +29,7 @@ const columns: GridColDef[] = [ { field: "actions", headerName: "Actions", + display: "flex", renderCell: function render({ row }) { // highlight-next-line return ; @@ -44,7 +45,7 @@ const PostsList: React.FC = () => { return ( - + ); }; diff --git a/documentation/docs/ui-integrations/material-ui/components/fields/boolean-field/index.md b/documentation/docs/ui-integrations/material-ui/components/fields/boolean-field/index.md index e33d124e3175..aa95b9dd8534 100644 --- a/documentation/docs/ui-integrations/material-ui/components/fields/boolean-field/index.md +++ b/documentation/docs/ui-integrations/material-ui/components/fields/boolean-field/index.md @@ -32,6 +32,7 @@ const columns: GridColDef[] = [ { field: "status", headerName: "Published", + display: "flex", renderCell: function render({ row }) { // highlight-start return ( @@ -57,7 +58,7 @@ const PostsList: React.FC = () => { return ( - + ); }; diff --git a/documentation/docs/ui-integrations/material-ui/components/fields/date-field/index.md b/documentation/docs/ui-integrations/material-ui/components/fields/date-field/index.md index 6ae5d4cbbc8f..eeadefbc6a13 100644 --- a/documentation/docs/ui-integrations/material-ui/components/fields/date-field/index.md +++ b/documentation/docs/ui-integrations/material-ui/components/fields/date-field/index.md @@ -31,6 +31,7 @@ const columns: GridColDef[] = [ { field: "createdAt", headerName: "Created At", + display: "flex", renderCell: function render({ row }) { // highlight-start return ; @@ -46,7 +47,7 @@ const PostsList: React.FC = () => { return ( - + ); }; diff --git a/documentation/docs/ui-integrations/material-ui/components/fields/email-field/index.md b/documentation/docs/ui-integrations/material-ui/components/fields/email-field/index.md index d74fd53cbdc9..5d53fad52c62 100644 --- a/documentation/docs/ui-integrations/material-ui/components/fields/email-field/index.md +++ b/documentation/docs/ui-integrations/material-ui/components/fields/email-field/index.md @@ -32,6 +32,7 @@ const columns: GridColDef[] = [ { field: "email", headerName: "Email Address", + display: "flex", renderCell: function render({ row }) { // highlight-start return ; @@ -47,7 +48,7 @@ const UsersList: React.FC = () => { return ( - + ); }; diff --git a/documentation/docs/ui-integrations/material-ui/components/fields/file-field/index.md b/documentation/docs/ui-integrations/material-ui/components/fields/file-field/index.md index e0dc7a3d303b..f4b24c20549c 100644 --- a/documentation/docs/ui-integrations/material-ui/components/fields/file-field/index.md +++ b/documentation/docs/ui-integrations/material-ui/components/fields/file-field/index.md @@ -31,6 +31,7 @@ const columns: GridColDef[] = [ { field: "image", headerName: "Image", + display: "flex", renderCell: function render({ row }) { // highlight-start return ( @@ -48,7 +49,7 @@ const PostsList: React.FC = () => { return ( - + ); }; diff --git a/documentation/docs/ui-integrations/material-ui/components/fields/number-field/index.md b/documentation/docs/ui-integrations/material-ui/components/fields/number-field/index.md index 830900f744eb..9061d9fbc83f 100644 --- a/documentation/docs/ui-integrations/material-ui/components/fields/number-field/index.md +++ b/documentation/docs/ui-integrations/material-ui/components/fields/number-field/index.md @@ -35,6 +35,7 @@ const columns: GridColDef[] = [ { field: "hit", headerName: "Hit", + display: "flex", renderCell: function render({ row }) { // highlight-start return ( @@ -57,7 +58,7 @@ const PostsList: React.FC = () => { return ( - + ); }; diff --git a/documentation/docs/ui-integrations/material-ui/components/fields/tag-field/index.md b/documentation/docs/ui-integrations/material-ui/components/fields/tag-field/index.md index 3fa50d98ab1a..f3e950c3a282 100644 --- a/documentation/docs/ui-integrations/material-ui/components/fields/tag-field/index.md +++ b/documentation/docs/ui-integrations/material-ui/components/fields/tag-field/index.md @@ -31,6 +31,7 @@ const columns: GridColDef[] = [ { field: "status", headerName: "Status", + display: "flex", renderCell: function render({ row }) { // highlight-start return ; @@ -46,7 +47,7 @@ const PostsList: React.FC = () => { return ( - + ); }; diff --git a/documentation/docs/ui-integrations/material-ui/components/fields/text-field/index.md b/documentation/docs/ui-integrations/material-ui/components/fields/text-field/index.md index d611ff15f9f6..61a1bed922c2 100644 --- a/documentation/docs/ui-integrations/material-ui/components/fields/text-field/index.md +++ b/documentation/docs/ui-integrations/material-ui/components/fields/text-field/index.md @@ -30,6 +30,7 @@ const columns: GridColDef[] = [ { field: "title", headerName: "Title", + display: "flex", renderCell: function render({ row }) { // highlight-start return ; @@ -45,7 +46,7 @@ const PostsList: React.FC = () => { return ( - + ); }; diff --git a/documentation/docs/ui-integrations/material-ui/components/fields/url-field/index.md b/documentation/docs/ui-integrations/material-ui/components/fields/url-field/index.md index 1e0f2717409f..0d1fd9c2221a 100644 --- a/documentation/docs/ui-integrations/material-ui/components/fields/url-field/index.md +++ b/documentation/docs/ui-integrations/material-ui/components/fields/url-field/index.md @@ -31,6 +31,7 @@ const columns: GridColDef[] = [ { field: "image", headerName: "Image URL", + display: "flex", renderCell: function render({ row }) { // highlight-start return ; @@ -46,7 +47,7 @@ const PostsList: React.FC = () => { return ( - + ); }; diff --git a/documentation/docs/ui-integrations/material-ui/hooks/use-data-grid/_partial-use-data-grid-basic-usage-live-preview.md b/documentation/docs/ui-integrations/material-ui/hooks/use-data-grid/_partial-use-data-grid-basic-usage-live-preview.md index 52d631206558..f82262656f30 100644 --- a/documentation/docs/ui-integrations/material-ui/hooks/use-data-grid/_partial-use-data-grid-basic-usage-live-preview.md +++ b/documentation/docs/ui-integrations/material-ui/hooks/use-data-grid/_partial-use-data-grid-basic-usage-live-preview.md @@ -36,7 +36,7 @@ const PostsList: React.FC = () => { return ( - + ); }; diff --git a/documentation/docs/ui-integrations/material-ui/hooks/use-data-grid/_partial-use-data-grid-relational-live-preview.md b/documentation/docs/ui-integrations/material-ui/hooks/use-data-grid/_partial-use-data-grid-relational-live-preview.md index c2499fafb241..b40689dc5a9c 100644 --- a/documentation/docs/ui-integrations/material-ui/hooks/use-data-grid/_partial-use-data-grid-relational-live-preview.md +++ b/documentation/docs/ui-integrations/material-ui/hooks/use-data-grid/_partial-use-data-grid-relational-live-preview.md @@ -4,13 +4,9 @@ setInitialRoutes(["/posts"]); // visible-block-start import React from "react"; // highlight-next-line -import { Option, useSelect } from "@refinedev/core"; +import { useSelect } from "@refinedev/core"; import { useDataGrid, List } from "@refinedev/mui"; -import { - DataGrid, - GridColDef, - GridValueFormatterParams, -} from "@mui/x-data-grid"; +import { DataGrid, GridColDef } from "@mui/x-data-grid"; import { ICategory, IPost } from "interfaces"; @@ -69,9 +65,7 @@ const PostsList: React.FC = () => { minWidth: 250, flex: 0.5, valueOptions: options, - valueFormatter: (params: GridValueFormatterParams