Changing theme works for compatibility with mui localization
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import { UiSchema } from "@rjsf/utils";
|
||||
import { useTranslation } from "@refinedev/core";
|
||||
import { List as RefineList, useDataGrid } from "@refinedev/mui";
|
||||
import { DataGrid, GridColDef, GridValidRowModel } from "@mui/x-data-grid";
|
||||
import { Link, useNavigate } from "react-router"
|
||||
import React, { useContext } from "react";
|
||||
import { Button } from "@mui/material";
|
||||
import { FirmContext } from "../../../contexts/FirmContext";
|
||||
import { useTranslation } from "@refinedev/core";
|
||||
|
||||
type ListProps<T extends GridValidRowModel> = {
|
||||
resource: string,
|
||||
@@ -20,7 +20,9 @@ const List = <T extends GridValidRowModel>(props: ListProps<T>) => {
|
||||
const { currentFirm } = useContext(FirmContext);
|
||||
const resourceBasePath = `firm/${currentFirm.instance}/${currentFirm.firm}`
|
||||
|
||||
const { dataGridProps } = useDataGrid<T>({resource: `${resourceBasePath}/${resource}`});
|
||||
const { dataGridProps } = useDataGrid<T>({
|
||||
resource: `${resourceBasePath}/${resource}`,
|
||||
});
|
||||
const navigate = useNavigate();
|
||||
|
||||
const cols = React.useMemo<GridColDef<T>[]>(
|
||||
@@ -40,7 +42,9 @@ const List = <T extends GridValidRowModel>(props: ListProps<T>) => {
|
||||
<DataGrid
|
||||
{...dataGridProps}
|
||||
columns={cols}
|
||||
onRowClick={handleRowClick} />
|
||||
onRowClick={handleRowClick}
|
||||
pageSizeOptions={[10, 15, 20, 50, 100]}
|
||||
/>
|
||||
</RefineList>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user