Skip to content

Commit 3ee01b0

Browse files
authored
Merge pull request #734 from icflorescu/next
Release 8.2 🎉
2 parents c2deb1a + d422743 commit 3ee01b0

25 files changed

+1001
-947
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@
33
The following is a list of notable changes to the Mantine DataTable component.
44
Minor versions that are not listed in the changelog are bug fixes and small improvements.
55

6+
## 8.2.0 (2025-07-23)
7+
8+
- **Significant performance improvement by reducing re-renders**, many thanks to [yergom](https://github.com/yergom) for PR [#732](https://github.com/icflorescu/mantine-datatable/pull/732)
9+
- Update deps to ensure compatibility with Mantine 8.2.0
10+
611
## 8.1.3 (2025-07-21)
712

813
- Enhance column resizing behavior for closed columns - many thanks to [Giovambattista Fazioli](https://github.com/gfazioli) for PR [#711](https://github.com/icflorescu/mantine-datatable/pull/711)
14+
- Update deps to ensure compatibility with Mantine 8.1.3 and Next.js 15.4.x
915

1016
## 8.1.2 (2025-03-24)
1117

app/examples/column-properties-and-styling/ColumnFooterExample.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@ import { employees } from '~/data';
88

99
const records = employees.slice(0, 10);
1010

11-
export function ColumnFooterExample() {
11+
export function ColumnFooterExample({ height }: { height?: number }) {
1212
return (
1313
// example-start
1414
<DataTable
1515
withTableBorder
1616
withColumnBorders
1717
striped
1818
records={records}
19+
height={height}
20+
withRowBorders
1921
columns={[
2022
{
2123
accessor: 'name',

app/examples/column-properties-and-styling/page.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ export default async function ColumnPropertiesAndStylingExamplePage() {
134134
<ColumnFooterExample />
135135
<Txt>Here’s the code for the example above:</Txt>
136136
<CodeBlock tabs={{ code, keys: ['ColumnFooterExample.tsx', 'data/index.ts'] }} />
137+
<Txt>The footer is always visible and sticks at the bottom. For example, if the table is scrollable:</Txt>
138+
<ColumnFooterExample height={200} />
139+
<Txt>Or if the table is higher than the amount of data:</Txt>
140+
<ColumnFooterExample height={550} />
137141
<PageSubtitle value="Styling column titles, cells and footers" />
138142
<Txt>In addition, each column can be further customized by specifying the following styling properties:</Txt>
139143
<UnorderedList>

package.json

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mantine-datatable",
3-
"version": "8.1.3",
3+
"version": "8.2.0",
44
"description": "The lightweight, dependency-free, dark-theme aware table component for your Mantine UI data-rich applications, featuring asynchronous data loading support, pagination, intuitive Gmail-style additive batch rows selection, column sorting, custom cell data rendering, row expansion, nesting, context menus, and much more",
55
"keywords": [
66
"mantine",
@@ -74,43 +74,43 @@
7474
"@docsearch/css": "^3.9.0",
7575
"@docsearch/react": "^3.9.0",
7676
"@eslint/eslintrc": "^3.3.1",
77-
"@faker-js/faker": "^9.8.0",
77+
"@faker-js/faker": "^9.9.0",
7878
"@formkit/auto-animate": "^0.8.2",
7979
"@hello-pangea/dnd": "^18.0.1",
80-
"@mantine/code-highlight": "^8.1.1",
81-
"@mantine/core": "^8.1.1",
82-
"@mantine/dates": "^8.1.1",
83-
"@mantine/hooks": "^8.1.1",
84-
"@mantine/modals": "^8.1.1",
85-
"@mantine/notifications": "^8.1.1",
86-
"@tabler/icons-react": "^3.34.0",
87-
"@tanstack/react-query": "^5.81.2",
88-
"@types/lodash": "^4.17.18",
89-
"@types/node": "^24.0.3",
80+
"@mantine/code-highlight": "^8.2.1",
81+
"@mantine/core": "^8.2.1",
82+
"@mantine/dates": "^8.2.1",
83+
"@mantine/hooks": "^8.2.1",
84+
"@mantine/modals": "^8.2.1",
85+
"@mantine/notifications": "^8.2.1",
86+
"@tabler/icons-react": "^3.34.1",
87+
"@tanstack/react-query": "^5.83.0",
88+
"@types/lodash": "^4.17.20",
89+
"@types/node": "^24.1.0",
9090
"@types/react": "^19.1.8",
9191
"@types/react-dom": "^19.1.6",
92-
"@typescript-eslint/eslint-plugin": "^8.35.0",
93-
"@typescript-eslint/parser": "^8.35.0",
92+
"@typescript-eslint/eslint-plugin": "^8.38.0",
93+
"@typescript-eslint/parser": "^8.38.0",
9494
"clsx": "^2.1.1",
95-
"cssnano": "^7.0.7",
95+
"cssnano": "^7.1.0",
9696
"dayjs": "^1.11.13",
97-
"eslint": "^9.29.0",
98-
"eslint-config-next": "^15.3.4",
99-
"eslint-config-prettier": "^10.1.5",
97+
"eslint": "^9.31.0",
98+
"eslint-config-next": "^15.4.3",
99+
"eslint-config-prettier": "^10.1.8",
100100
"lodash": "^4.17.21",
101-
"mantine-contextmenu": "^8.1.2",
102-
"next": "^15.3.4",
101+
"mantine-contextmenu": "^8.2.0",
102+
"next": "^15.4.3",
103103
"postcss": "^8.5.6",
104104
"postcss-cli": "^11.0.1",
105105
"postcss-import": "^16.1.1",
106-
"postcss-preset-mantine": "^1.17.0",
106+
"postcss-preset-mantine": "^1.18.0",
107107
"postcss-simple-vars": "^7.0.1",
108-
"prettier": "^3.6.0",
108+
"prettier": "^3.6.2",
109109
"react": "^19.1.0",
110110
"react-dom": "^19.1.0",
111-
"sharp": "^0.34.2",
112-
"shiki": "^3.7.0",
113-
"swr": "^2.3.3",
111+
"sharp": "^0.34.3",
112+
"shiki": "^3.8.1",
113+
"swr": "^2.3.4",
114114
"tsup": "^8.5.0",
115115
"typescript": "^5.8.3"
116116
},

package/DataTable.css

Lines changed: 20 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
light-dark(--mantine-datatable-highlight-on-hover-color-light, --mantine-datatable-highlight-on-hover-color-dark),
2424
light-dark(var(--mantine-color-gray-1), var(--mantine-color-dark-5))
2525
);
26+
--mantine-datatable-selection-color: var(--mantine-primary-color-light);
2627
--mantine-datatable-shadow-background-top:
2728
linear-gradient(rgba(0, 0, 0, light-dark(0.05, 0.25)), rgba(0, 0, 0, 0)),
2829
linear-gradient(rgba(0, 0, 0, light-dark(0.05, 0.25)) 30%, rgba(0, 0, 0, 0));
@@ -36,6 +37,17 @@
3637
linear-gradient(to right, rgba(0, 0, 0, light-dark(0.05, 0.25)), rgba(0, 0, 0, 0)),
3738
linear-gradient(to right, rgba(0, 0, 0, light-dark(0.05, 0.25)), rgba(0, 0, 0, 0) 30%);
3839

40+
--mantine-datatable-header-height: 0;
41+
--mantine-datatable-footer-height: 0;
42+
--mantine-datatable-selection-column-width: 0;
43+
--mantine-datatable-top-shadow-opacity: 0;
44+
--mantine-datatable-left-shadow-opacity: 0;
45+
--mantine-datatable-bottom-shadow-opacity: 0;
46+
--mantine-datatable-right-shadow-opacity: 0;
47+
--mantine-datatable-footer-position: sticky;
48+
--mantine-datatable-footer-bottom: 0;
49+
--mantine-datatable-last-row-border-bottom: unset;
50+
3951
position: relative;
4052
display: flex;
4153
flex-direction: column;
@@ -90,6 +102,10 @@
90102
tbody tr:last-of-type {
91103
border-bottom: 0;
92104
}
105+
106+
tr:last-of-type:not(.mantine-datatable-empty-row) td {
107+
border-bottom: var(--mantine-datatable-last-row-border-bottom);
108+
}
93109
}
94110

95111
.mantine-datatable-vertical-align-top td {
@@ -126,7 +142,7 @@
126142
width: var(--mantine-spacing-xs);
127143
background: var(--mantine-datatable-shadow-background-right);
128144
pointer-events: none;
129-
opacity: 0;
145+
opacity: var(--mantine-datatable-right-shadow-opacity);
130146
transition: opacity 0.2s;
131147
}
132148
}
@@ -152,16 +168,7 @@
152168
bottom: 0;
153169
left: 0;
154170
right: 0;
155-
background: var(--mantine-primary-color-light);
156-
}
157-
}
158-
159-
&-scrolled {
160-
th:last-of-type,
161-
td:not(.mantine-datatable-row-expansion-cell):last-of-type {
162-
&::after {
163-
opacity: 1;
164-
}
171+
background: var(--mantine-datatable-selection-color);
165172
}
166173
}
167174
}
@@ -187,7 +194,7 @@
187194
width: var(--mantine-spacing-xs);
188195
background: var(--mantine-datatable-shadow-background-left);
189196
pointer-events: none;
190-
opacity: 0;
197+
opacity: var(--mantine-datatable-left-shadow-opacity);
191198
transition: opacity 0.2s;
192199
}
193200
}
@@ -231,19 +238,7 @@
231238
bottom: 0;
232239
left: 0;
233240
right: 0;
234-
background: var(--mantine-primary-color-light);
235-
}
236-
}
237-
238-
&-scrolled:not(.mantine-datatable-selection-column-visible) th:first-of-type,
239-
&-scrolled:not(.mantine-datatable-selection-column-visible)
240-
td:not(.mantine-datatable-row-expansion-cell):first-of-type,
241-
&-scrolled.mantine-datatable-selection-column-visible th:first-of-type,
242-
&-scrolled.mantine-datatable-selection-column-visible tr:not(:nth-of-type(2)) th:nth-of-type(2),
243-
&-scrolled.mantine-datatable-selection-column-visible th.mantine-datatable-column-group-header-cell:nth-of-type(2),
244-
&-scrolled.mantine-datatable-selection-column-visible td:not(.mantine-datatable-row-expansion-cell):nth-of-type(2) {
245-
&::after {
246-
opacity: 1;
241+
background: var(--mantine-datatable-selection-color);
247242
}
248243
}
249244
}

0 commit comments

Comments
 (0)