Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to MUI 6 and Material-React-Table 3 #2463

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/odyssey-react-mui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
"@emotion/styled": "^11.14.0",
"@mui/icons-material": "^5.16.14",
"@mui/lab": "^5.0.0-alpha.175",
"@mui/material": "^5.16.14",
"@mui/material": "^6.4.0",
"@mui/system": "^5.16.14",
"@mui/utils": "^5.16.14",
"@mui/x-date-pickers": "^7.2.0",
Expand All @@ -102,7 +102,7 @@
"dom-accessibility-api": "^0.7.0",
"i18next": "^23.15.1",
"luxon": "^3.4.4",
"material-react-table": "^2.11.3",
"material-react-table": "^3.1.0",
"react-error-boundary": "^4.1.1",
"react-i18next": "^15.1.1",
"react-window": "^1.8.10",
Expand Down
2 changes: 1 addition & 1 deletion packages/odyssey-react-mui/src/Box.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export type BoxProps = {
} & Pick<HtmlProps, "testId" | "translate">;

const Box = forwardRef<HTMLElement, BoxProps>(
({ children, component, id, role, sx, testId, translate }, ref) => (
({ children, component = "div", id, role, sx, testId, translate }, ref) => (
<MuiBox
ref={ref}
children={children}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -960,10 +960,10 @@ describe("DataView", () => {
const rows = await screen.findAllByRole("row");
const tHead = rows[0].parentElement;

// Ensure that the resize handle is displayed when
// hasColumnResizing is true
const hrElement = tHead!.querySelector("hr");
expect(tHead).toContainElement(hrElement);
// Get all separators and pick the first one
const separators = within(tHead!).getAllByRole("separator");
expect(separators.length).toBeGreaterThan(0);
expect(tHead).toContainElement(separators[0]);
});

describe("Pagination", () => {
Expand Down
4 changes: 2 additions & 2 deletions packages/odyssey-react-mui/src/labs/PaginatedTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
type MRT_ColumnFiltersState,
type MRT_RowSelectionState,
type MRT_TableInstance,
type MRT_Virtualizer,
type MRT_RowVirtualizer,
useMaterialReactTable,
MaterialReactTable,
} from "material-react-table";
Expand Down Expand Up @@ -73,7 +73,7 @@ const PaginatedTable = <TData extends DefaultMaterialReactTableData>({
const { t } = useTranslation();

const rowVirtualizerInstanceRef =
useRef<MRT_Virtualizer<HTMLDivElement, HTMLTableRowElement>>(null);
useRef<MRT_RowVirtualizer<HTMLDivElement, HTMLTableRowElement>>(null);

const [columnFilters, setColumnFilters] = useState<MRT_ColumnFiltersState>(
[],
Expand Down
4 changes: 2 additions & 2 deletions packages/odyssey-react-mui/src/labs/StaticTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
useMaterialReactTable,
type MRT_ColumnFiltersState,
type MRT_TableInstance,
type MRT_Virtualizer,
type MRT_RowVirtualizer,
MaterialReactTable,
} from "material-react-table";
import {
Expand Down Expand Up @@ -57,7 +57,7 @@ const StaticTable = <TData extends DefaultMaterialReactTableData>({
const { t } = useTranslation();

const rowVirtualizerInstanceRef =
useRef<MRT_Virtualizer<HTMLDivElement, HTMLTableRowElement>>(null);
useRef<MRT_RowVirtualizer<HTMLDivElement, HTMLTableRowElement>>(null);

const [columnFilters, setColumnFilters] = useState<MRT_ColumnFiltersState>(
[],
Expand Down
2 changes: 1 addition & 1 deletion packages/odyssey-storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.0",
"@faker-js/faker": "^8.4.1",
"@mui/material": "^5.16.14",
"@mui/material": "^6.4.0",
"@okta/odyssey-design-tokens": "workspace:*",
"@okta/odyssey-react-mui": "workspace:*",
"@okta/odyssey-typescript": "workspace:*",
Expand Down
Loading