Skip to content
Closed
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
11 changes: 6 additions & 5 deletions apps/mantine-react-table-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
"@fortawesome/fontawesome-svg-core": "^6.6.0",
"@fortawesome/free-solid-svg-icons": "^6.6.0",
"@fortawesome/react-fontawesome": "^0.2.2",
"@mantine/code-highlight": "7.13.2",
"@mantine/core": "7.13.2",
"@mantine/dates": "7.13.2",
"@mantine/hooks": "7.13.2",
"@mantine/modals": "7.13.2",
"@mantine/code-highlight": "8.3.2",
"@mantine/core": "8.3.2",
"@mantine/dates": "8.3.2",
"@mantine/hooks": "8.3.2",
"@mantine/modals": "8.3.2",
"@mdx-js/loader": "^3.0.1",
"@mdx-js/react": "^3.0.1",
"@next/mdx": "^14.2.15",
Expand All @@ -34,6 +34,7 @@
"export-to-csv": "^1.4.0",
"jspdf": "^2.5.2",
"jspdf-autotable": "^3.8.3",
"mantine-contextmenu": "^8.2.0",
"mantine-react-table": "workspace:*",
"next": "14.2.15",
"next-sitemap": "^4.2.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { IconInfoCircle } from '@tabler/icons-react';
<meta name="description" content="How to install Mantine React Table" />
</Head>

> This is the install guide for `mantine-react-table` **V2** and `@mantine/` packages **V7**. MRT V2 will not work with Mantine V6.
> This is the install guide for `mantine-react-table` **V3** and `@mantine/` packages **V8**. MRT V2 will not work with Mantine V6-7.

<Alert variant="light" color="orange" icon={<IconInfoCircle />}>
Mantine React Table V2 is still a work in progress, but we are making good
Expand All @@ -18,29 +18,29 @@ import { IconInfoCircle } from '@tabler/icons-react';

## Installation

> `mantine-react-table` V2 requires **Mantine V7.3+** packages as dependencies in your project.
> `mantine-react-table` V3 requires **Mantine V8.0+** packages as dependencies in your project.
>
> If you are already using Mantine, you probably already have most of these peer dependencies installed.
>
> Just double-check that you have the following in your package.json, or use the [full install commands](<#install-with-required-peer-dependencies-(recommended)>) below.
>
> 1. `@mantine/core` (^v7.3+)
> 2. `@mantine/hooks` (^v7.3+)
> 3. `@mantine/dates` (^v7.3+)
> 1. `@mantine/core` (^v8.0+)
> 2. `@mantine/hooks` (^v8.0+)
> 3. `@mantine/dates` (^v8.0+)
> 4. `@tabler/icons-react` (2.23.0+)
> 5. `dayjs` (v1.11+)
> 6. `clsx` (v2+)
> 7. `react` and `react-dom` (v18)

### Quick Install

The Quick Install instructions here assume you already have Mantine V7 installed and correctly configured with postcss in your project.
The Quick Install instructions here assume you already have Mantine V8 installed and correctly configured with postcss in your project.

<InstallCommand packagesString="mantine-react-table@beta" />

### Install With Required Peer Dependencies (Recommended)

It is best to refer to the [Mantine V7 installation guide](https://mantine.dev/getting-started/) for the most up-to-date instructions on how to install Mantine V7 for your specific React meta framework. (Next.js, Remix, Vite, etc.)
It is best to refer to the [Mantine V8 installation guide](https://mantine.dev/getting-started/) for the most up-to-date instructions on how to install Mantine V8 for your specific React meta framework. (Next.js, Remix, Vite, etc.)

#### Install Mantine React Table with Mantine required peer dependencies:

Expand All @@ -53,7 +53,7 @@ It is best to refer to the [Mantine V7 installation guide](https://mantine.dev/g

#### Install PostCSS dev dependencies (Optional)

If you are using Mantine V7, it is common to use CSS modules for advanced custom styling. You may want to install and configure PostCSS like down below, but it is not required if you are using a different styling solution.
If you are using Mantine V8, it is common to use CSS modules for advanced custom styling. You may want to install and configure PostCSS like down below, but it is not required if you are using a different styling solution.

<InstallCommand packagesString="-D postcss postcss-preset-mantine postcss-simple-vars" />
<br />
Expand Down Expand Up @@ -81,7 +81,7 @@ module.exports = {

### Setup Mantine Theme

The [Mantine V7 installation guide](https://mantine.dev/getting-started/) has much better instructions for how to set up your Mantine theme, but you should have something like this in your project:
The [Mantine V8 installation guide](https://mantine.dev/getting-started/) has much better instructions for how to set up your Mantine theme, but you should have something like this in your project:

```tsx
import { MantineProvider, createTheme } from '@mantine/core';
Expand All @@ -104,14 +104,14 @@ function Demo() {
After you install mantine-react-table, you will need to import the CSS styles from `mantine-react-table/styles.css` at the root of your project. (Where you import your other Mantine CSS styles.)

```js
import '@mantine/core/styles.css'; //import Mantine V7 styles needed by MRT
import '@mantine/core/styles.css'; //import Mantine V8 styles needed by MRT
import '@mantine/dates/styles.css'; //if using mantine date picker features
import 'mantine-react-table/styles.css'; //import MRT styles
```

### Common Errors

If you don't see any styles applied to the mantine table components, you may have mismatching versions of `mantine-react-table` and `@mantine/core`. MRT v1 requires Mantine v6 and will not work with Mantine v7. MRT v2 will be released by the end of 2023 and will work with Mantine v7.
If you don't see any styles applied to the mantine table components, you may have mismatching versions of `mantine-react-table` and `@mantine/core`. MRT v1 requires Mantine v6 and will not work with Mantine v7. MRT v3 now targets Mantine v8.

Also, if the Action Icon Buttons all have a filled color, that is a good sign that you simply forgot to import the MRT CSS file in the step above.

Expand All @@ -126,7 +126,7 @@ or you might have mixed up default and named imports.

You probably do not have the correct version of Mantine or Tabler Icons installed.

Make sure all mantine packages are at least v7.3.
Make sure all mantine packages are at least v8.0.

Make sure that the `@tabler/icons-react` package is at least v2.23.0.

Expand Down Expand Up @@ -160,7 +160,15 @@ Then try upgrading either `webpack` or `react-scripts` to the latest versions.
name: 'Does Mantine V7 Work with Mantine React Table?',
acceptedAnswer: {
'@type': 'Answer',
text: 'Eventually. MRT v2 will be completely rewritten to use Mantine v7. This should be available by the end of 2023.',
text: 'MRT v2 will be completely rewritten to use Mantine v7. This should be available by the end of 2023.',
},
},
{
'@type': 'Question',
name: 'Does Mantine V8 Work with Mantine React Table?',
acceptedAnswer: {
'@type': 'Answer',
text: 'MRT v3 will be completely rewritten to use Mantine v8.',
},
},
{
Expand Down
10 changes: 6 additions & 4 deletions packages/mantine-react-table/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@
"@babel/core": "^7.25.8",
"@babel/preset-react": "^7.25.7",
"@faker-js/faker": "^9.0.3",
"@mantine/core": "7.13.2",
"@mantine/dates": "7.13.2",
"@mantine/hooks": "7.13.2",
"@mantine/core": "8.3.2",
"@mantine/dates": "8.3.2",
"@mantine/hooks": "8.3.2",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-node-resolve": "^15.3.0",
"@rollup/plugin-typescript": "^11.1.6",
Expand All @@ -110,7 +110,7 @@
"dayjs": "^1.11.13",
"eslint": "^8.57.0",
"eslint-plugin-perfectionist": "^3.8.0",
"mantine-contextmenu": "^7.12.2",
"mantine-contextmenu": "^8.2.0",
"postcss": "^8.4.47",
"postcss-preset-mantine": "^1.17.0",
"postcss-simple-vars": "^7.0.1",
Expand All @@ -133,6 +133,8 @@
"vite": "^5.4.8"
},
"dependencies": {
"@mantine/code-highlight": "^8.3.2",
"@mantine/modals": "^8.3.2",
"@tanstack/match-sorter-utils": "8.19.4",
"@tanstack/react-table": "8.20.5",
"@tanstack/react-virtual": "3.11.2"
Expand Down
1 change: 1 addition & 0 deletions packages/mantine-react-table/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pkg from './package.json' assert { type: 'json' };

import typescript from '@rollup/plugin-typescript';
import copy from 'rollup-plugin-copy';
import del from 'rollup-plugin-delete';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import classes from './MRT_TableHeadCell.module.css';
import {
type CSSProperties,
type DragEventHandler,
type MutableRefObject,
type ReactNode,
useMemo,
useState,
Expand Down Expand Up @@ -207,9 +206,7 @@ export const MRT_TableHeadCell = <TData extends MRT_RowData>({
ref={(node: HTMLTableCellElement) => {
if (node) {
tableHeadCellRefs.current[column.id] = node;
(
isHoveredHeadCellRef as MutableRefObject<HTMLTableCellElement>
).current = node;
isHoveredHeadCellRef(node);
if (columnDefType !== 'group') {
columnVirtualizer?.measureElement?.(node);
}
Expand Down
Loading