Skip to content

Commit

Permalink
release v3.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinVandy committed Dec 22, 2024
1 parent 126f236 commit 254517b
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 45 deletions.
16 changes: 15 additions & 1 deletion apps/material-react-table-docs/pages/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/).
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": "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.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,12 @@ const data = [...Array(300)].map(() => ({
}));

export const ColumnGroupingEnabled = () => (
<MaterialReactTable columns={columns} data={data} enableGrouping />
<MaterialReactTable
columns={columns}
data={data}
enableGrouping
enableRowSelection
/>
);

export const ColumnGroupingEnabledReorder = () => (
Expand Down

0 comments on commit 254517b

Please sign in to comment.