From 254517bf791966850f2bfe118d2ae17c3ffbb2c0 Mon Sep 17 00:00:00 2001 From: Kevin Van Cott Date: Sun, 22 Dec 2024 14:31:03 -0600 Subject: [PATCH] release v3.1.0 --- .../pages/changelog.mdx | 16 ++++++- .../docs/getting-started/migrating-to-v3.mdx | 43 +------------------ packages/material-react-table/package.json | 2 +- .../features/ColumnGrouping.stories.tsx | 7 ++- 4 files changed, 23 insertions(+), 45 deletions(-) diff --git a/apps/material-react-table-docs/pages/changelog.mdx b/apps/material-react-table-docs/pages/changelog.mdx index 4964fb212..950765bb9 100644 --- a/apps/material-react-table-docs/pages/changelog.mdx +++ b/apps/material-react-table-docs/pages/changelog.mdx @@ -7,6 +7,20 @@ import Head from 'next/head'; ## MRT V3 Changelog +### Version 3.1.0 - 2024-12-22 + +- Un-deprecated several `mui*Props` that were initially marked as deprecated in V3.0.0. They will be sticking around longer than expected until TanStack Table itself handles merging `defaultColumn` options better +- Updated Types for React 19 (Fixed some JSX namespace issues) +- MRT_FilterTextField improvements: + - Refactored to better use the slotProps API internally, but still accept custom props from `muiFilterTextFieldProps` and the like + - Set the visibility of the "Clear" filter text field button to be hidden unless the filter text field has a value + - Fixed overlapping input label in select filters + - Fixed Range Slider filter keyboard navigation to not move the focus to the next cell when using the arrow keys on the slider +- Fixed "Clear Sorting" Menu Item not being disabled if there was no sorting applied to that column +- Fixed bug where "Reset Column Size" Menu Item was disabled when a column had a size of 0 +- Fixed issue with Select Edit inputs not blurring correctly +- Fixed total selected row count when grouping by columns + ### Version 3.0.3 - 2024-12-13 - Fixed filter text field value @@ -16,7 +30,7 @@ import Head from 'next/head'; - Fixed rendering of multi-select filter when filter value is an empty array - Rearranged execution of `muiTableBodyCellProps?.onKeyDown` internally to allow these events to be overridden or even skipped - Fixed MRT_RowActionMenu key prop internally -- Corrected Sweedish `sv` locale translations +- Corrected Swedish `sv` locale translations - Removed 'new-password' from autocomplete in text fields and just use 'off' ### Version 3.0.1 - 2024-09-05 diff --git a/apps/material-react-table-docs/pages/docs/getting-started/migrating-to-v3.mdx b/apps/material-react-table-docs/pages/docs/getting-started/migrating-to-v3.mdx index 00c9cd3db..162fad315 100644 --- a/apps/material-react-table-docs/pages/docs/getting-started/migrating-to-v3.mdx +++ b/apps/material-react-table-docs/pages/docs/getting-started/migrating-to-v3.mdx @@ -59,49 +59,8 @@ You should now be on Material React Table V3! Look for any code or type errors i - Keyboard navigation for table cells in now enabled by default. If you had added your own custom keyboard shortcuts, you may want to set `enableKeyboardShortcuts` to `false` or remove your custom shortcuts. - Removed deprecated `MRT_Virtualizer` type in favor of separate `MRT_RowVirtualizer` and `MRT_ColumnVirtualizer` types - Removed deprecated `text` in favor of the more consistent `label` type in dropdown/autocomplete/select option types. -- Deprecated several `mui*Props` table options that were column-specific. These table options should either be specified in column defs or in the `defaultColumn` table option. - - `muiColumnActionsButtonProps` - - `muiColumnDragHandleProps` - - `muiCopyButtonProps` - - `muiEditTextFieldProps` - - `muiFilterAutocompleteProps` - - `muiFilterCheckboxProps` - - `muiFilterDatePickerProps` - - `muiFilterDateTimePickerProps` - - `muiFilterSliderProps` - - `muiFilterTextFieldProps` - - `muiFilterTimePickerProps` - - `muiTableBodyCellProps` - - `muiTableHeadCellProps` - - `muiTableFooterCellProps` - - `renderCellActionMenuItems` - - `renderColumnActionsMenuItems` - - `renderColumnFilterModeMenuItems` - -```diff -const table = useTable({ - columns, - data, - // Recommended to specify these table options in the defaultColumn instead -+ defaultColumn: { // applies to all columns -+ muiTableBodyCellProps: { -+ align: 'center', -+ }, -+ muiFilterAutocompleteProps: { -+ sx: { my: 2 }, -+ }, -+ }, -// these table options will be removed in MRT V4 -- muiTableBodyCellProps: { -- align: 'center', -- }, -- muiFilterAutocompleteProps: { -- sx: { my: 2 }, -- }, -)}; -``` -You can be lazy with these changes. These table options are just marked as deprecated, but they will still work until MRT V4. +> Note: As of MRT V3.1.0, some muiProps that were initially marked as deprecated in V3.0.0 are no longer deprecated until a future version of TanStack Table comes out that handles `defaultColumn` options merging better. > Can I uninstall Emotion Yet? No, Emotion is still required for Material React Table V3, but it won't be for long. MRT V4 will remove the Emotion dependency in favor of [Pigment CSS](https://mui.com/blog/introducing-pigment-css/). diff --git a/packages/material-react-table/package.json b/packages/material-react-table/package.json index d41c9cca2..dd64f0aa4 100644 --- a/packages/material-react-table/package.json +++ b/packages/material-react-table/package.json @@ -1,5 +1,5 @@ { - "version": "3.0.3", + "version": "3.1.0", "license": "MIT", "name": "material-react-table", "description": "A fully featured Material UI V6 implementation of TanStack React Table V8, written from the ground up in TypeScript.", diff --git a/packages/material-react-table/stories/features/ColumnGrouping.stories.tsx b/packages/material-react-table/stories/features/ColumnGrouping.stories.tsx index 4ffad0838..23435edf0 100644 --- a/packages/material-react-table/stories/features/ColumnGrouping.stories.tsx +++ b/packages/material-react-table/stories/features/ColumnGrouping.stories.tsx @@ -53,7 +53,12 @@ const data = [...Array(300)].map(() => ({ })); export const ColumnGroupingEnabled = () => ( - + ); export const ColumnGroupingEnabledReorder = () => (