Skip to content

Commit

Permalink
release v1.8.4 - fixes Column resizing with header groups no longer w…
Browse files Browse the repository at this point in the history
…orks #402
  • Loading branch information
KevinVandy committed Mar 2, 2023
1 parent cbefb87 commit 6aa284f
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 59 deletions.
2 changes: 1 addition & 1 deletion apps/material-react-table-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"dayjs": "^1.11.7",
"export-to-csv": "^0.2.1",
"material-react-table": "workspace:*",
"next": "13.1.6",
"next": "13.1.0",
"next-sitemap": "^3.1.54",
"prism-react-renderer": "^1.3.5",
"react": "18.2.0",
Expand Down
4 changes: 4 additions & 0 deletions apps/material-react-table-docs/pages/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ import Head from 'next/head';

### Version 1 (Latest)

#### v1.8.4 (2023-03-02)

- Fixed column resizing issues with nested column groups

#### v1.8.3 (2023-02-27)

- Add back support for custom edit and filter textfield children
Expand Down
2 changes: 1 addition & 1 deletion packages/material-react-table/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.8.3",
"version": "1.8.4",
"license": "MIT",
"name": "material-react-table",
"description": "A fully featured Material UI V5 implementation of TanStack React Table V8, written from the ground up in TypeScript.",
Expand Down
4 changes: 2 additions & 2 deletions packages/material-react-table/src/column.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,10 @@ export const getCommonCellStyles = ({
...(tableCellProps?.sx instanceof Function
? tableCellProps.sx(theme)
: (tableCellProps?.sx as any)),
minWidth: `max(calc(var(--col-${parseCSSVarId(
minWidth: `max(calc(var(--${header ? 'header' : 'col'}-${parseCSSVarId(
header?.id ?? column.id,
)}-size) * 1px), ${column.columnDef.minSize ?? 30}px)`,
width: `calc(var(--col-${parseCSSVarId(
width: `calc(var(--${header ? 'header' : 'col'}-${parseCSSVarId(
header?.id ?? column.id,
)}-size) * 1px)`,
});
Expand Down
6 changes: 3 additions & 3 deletions packages/material-react-table/src/table/MRT_Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ export const MRT_Table = ({ table }: Props) => {
const colSizes: { [key: string]: number } = {};
for (let i = 0; i < headers.length; i++) {
const header = headers[i];
const colSize = header.getSize();
colSizes[`--header-${parseCSSVarId(header.id)}-size`] = colSize;
colSizes[`--col-${parseCSSVarId(header.column.id)}-size`] = colSize;
colSizes[`--header-${parseCSSVarId(header.id)}-size`] = header.getSize();
colSizes[`--col-${parseCSSVarId(header.column.id)}-size`] =
header.column.getSize();
}
return colSizes;
}, [columns, columnSizing, columnSizingInfo, columnVisibility]);
Expand Down
104 changes: 52 additions & 52 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 comments on commit 6aa284f

@vercel
Copy link

@vercel vercel bot commented on 6aa284f Mar 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 6aa284f Mar 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.