@mini_7/material-react-table-mcp 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +68 -0
- package/data/MIGRATION.md +136 -0
- package/data/api.json +5379 -0
- package/data/examples/advanced.tsx +309 -0
- package/data/examples/aggregation-and-grouping.tsx +153 -0
- package/data/examples/aggregation-multi.tsx +105 -0
- package/data/examples/alternate-column-filtering.tsx +49 -0
- package/data/examples/alternate-detail-panel.tsx +81 -0
- package/data/examples/alternate-pagination.tsx +23 -0
- package/data/examples/basic.tsx +109 -0
- package/data/examples/chart-detail-panel.tsx +89 -0
- package/data/examples/column-actions-space.tsx +44 -0
- package/data/examples/column-alignment.tsx +70 -0
- package/data/examples/custom-column-actions.tsx +109 -0
- package/data/examples/custom-column-filtering-ui.tsx +89 -0
- package/data/examples/custom-headless.tsx +125 -0
- package/data/examples/custom-top-toolbar.tsx +88 -0
- package/data/examples/customize-display-columns.tsx +85 -0
- package/data/examples/customize-filter-components.tsx +101 -0
- package/data/examples/customize-filter-modes.tsx +73 -0
- package/data/examples/customize-filter-variants.tsx +116 -0
- package/data/examples/customize-global-filter-component.tsx +52 -0
- package/data/examples/customize-remove-column-grouping.tsx +94 -0
- package/data/examples/customize-row-selection.tsx +54 -0
- package/data/examples/customize-table-styles.tsx +100 -0
- package/data/examples/disable-column-actions.tsx +37 -0
- package/data/examples/disable-column-hiding.tsx +90 -0
- package/data/examples/disable-density-toggle.tsx +49 -0
- package/data/examples/dynamic-columns.tsx +189 -0
- package/data/examples/editing-crud-cell.tsx +377 -0
- package/data/examples/editing-crud-modal.tsx +370 -0
- package/data/examples/editing-crud-row.tsx +333 -0
- package/data/examples/editing-crud-table.tsx +369 -0
- package/data/examples/editing-crud-tree.tsx +416 -0
- package/data/examples/enable-cell-actions.tsx +76 -0
- package/data/examples/enable-click-to-copy.tsx +39 -0
- package/data/examples/enable-column-grouping.tsx +120 -0
- package/data/examples/enable-column-ordering.tsx +48 -0
- package/data/examples/enable-column-pinning.tsx +69 -0
- package/data/examples/enable-column-resizing.tsx +56 -0
- package/data/examples/enable-column-virtualization.tsx +27 -0
- package/data/examples/enable-detail-panel-conditionally.tsx +78 -0
- package/data/examples/enable-detail-panel-virtualized.tsx +80 -0
- package/data/examples/enable-expanding-tree.tsx +110 -0
- package/data/examples/enable-filter-facet-values.tsx +65 -0
- package/data/examples/enable-row-dragging.tsx +137 -0
- package/data/examples/enable-row-numbers-original.tsx +48 -0
- package/data/examples/enable-row-numbers-static.tsx +48 -0
- package/data/examples/enable-row-ordering.tsx +57 -0
- package/data/examples/enable-row-pinning-select.tsx +76 -0
- package/data/examples/enable-row-pinning-static.tsx +50 -0
- package/data/examples/enable-row-pinning-sticky.tsx +69 -0
- package/data/examples/enable-row-selection.tsx +96 -0
- package/data/examples/enable-row-virtualization.tsx +101 -0
- package/data/examples/enable-sticky-header.tsx +59 -0
- package/data/examples/expanding-tree-expanded.tsx +121 -0
- package/data/examples/expanding-tree-flat-parse.tsx +125 -0
- package/data/examples/expanding-tree-root-expanded.tsx +151 -0
- package/data/examples/export-to-csv.tsx +114 -0
- package/data/examples/export-to-pdf.tsx +104 -0
- package/data/examples/external-toolbar.tsx +108 -0
- package/data/examples/font-awesome-icons.tsx +106 -0
- package/data/examples/infinite-scrolling.tsx +208 -0
- package/data/examples/lazy-detail-panel.tsx +262 -0
- package/data/examples/lazy-sub-rows.tsx +190 -0
- package/data/examples/linear-progress.tsx +66 -0
- package/data/examples/loading.tsx +50 -0
- package/data/examples/localization-i18n-ar.tsx +65 -0
- package/data/examples/localization-i18n-az.tsx +60 -0
- package/data/examples/localization-i18n-bg.tsx +60 -0
- package/data/examples/localization-i18n-cs.tsx +60 -0
- package/data/examples/localization-i18n-da.tsx +60 -0
- package/data/examples/localization-i18n-de.tsx +60 -0
- package/data/examples/localization-i18n-el.tsx +60 -0
- package/data/examples/localization-i18n-en.tsx +60 -0
- package/data/examples/localization-i18n-es.tsx +60 -0
- package/data/examples/localization-i18n-et.tsx +60 -0
- package/data/examples/localization-i18n-fa.tsx +66 -0
- package/data/examples/localization-i18n-fi.tsx +60 -0
- package/data/examples/localization-i18n-fr.tsx +60 -0
- package/data/examples/localization-i18n-he.tsx +66 -0
- package/data/examples/localization-i18n-hr.tsx +60 -0
- package/data/examples/localization-i18n-hu.tsx +60 -0
- package/data/examples/localization-i18n-hy.tsx +65 -0
- package/data/examples/localization-i18n-id.tsx +60 -0
- package/data/examples/localization-i18n-it.tsx +60 -0
- package/data/examples/localization-i18n-ja.tsx +60 -0
- package/data/examples/localization-i18n-ko.tsx +60 -0
- package/data/examples/localization-i18n-nl.tsx +60 -0
- package/data/examples/localization-i18n-no.tsx +60 -0
- package/data/examples/localization-i18n-np.tsx +60 -0
- package/data/examples/localization-i18n-pl.tsx +60 -0
- package/data/examples/localization-i18n-pt-BR.tsx +60 -0
- package/data/examples/localization-i18n-pt.tsx +60 -0
- package/data/examples/localization-i18n-ro.tsx +60 -0
- package/data/examples/localization-i18n-ru.tsx +60 -0
- package/data/examples/localization-i18n-sk.tsx +60 -0
- package/data/examples/localization-i18n-sr-Cyrl-RS.tsx +60 -0
- package/data/examples/localization-i18n-sr-Latn-RS.tsx +60 -0
- package/data/examples/localization-i18n-sv.tsx +60 -0
- package/data/examples/localization-i18n-tr.tsx +60 -0
- package/data/examples/localization-i18n-uk.tsx +60 -0
- package/data/examples/localization-i18n-vi.tsx +60 -0
- package/data/examples/localization-i18n-zh-hans.tsx +60 -0
- package/data/examples/localization-i18n-zh-hant.tsx +60 -0
- package/data/examples/manual-selection.tsx +105 -0
- package/data/examples/minimal.tsx +78 -0
- package/data/examples/mui-theme.tsx +136 -0
- package/data/examples/multi-sorting.tsx +58 -0
- package/data/examples/persistent-state.tsx +184 -0
- package/data/examples/react-query.tsx +182 -0
- package/data/examples/remote.tsx +150 -0
- package/data/examples/row-actions-buttons.tsx +89 -0
- package/data/examples/row-actions-menu-items.tsx +64 -0
- package/data/examples/single-row-selection.tsx +98 -0
- package/data/examples/virtualized.tsx +138 -0
- package/data/guides/accessibility.md +119 -0
- package/data/guides/aggregation.md +210 -0
- package/data/guides/async-loading.md +132 -0
- package/data/guides/best-practices.md +363 -0
- package/data/guides/cell-actions.md +139 -0
- package/data/guides/click-to-copy.md +67 -0
- package/data/guides/column-actions.md +69 -0
- package/data/guides/column-filtering.md +366 -0
- package/data/guides/column-grouping.md +192 -0
- package/data/guides/column-hiding.md +133 -0
- package/data/guides/column-ordering-dnd.md +99 -0
- package/data/guides/column-pinning.md +72 -0
- package/data/guides/column-resizing.md +157 -0
- package/data/guides/column-size.md +162 -0
- package/data/guides/customize-components.md +395 -0
- package/data/guides/customize-icons.md +35 -0
- package/data/guides/data-columns.md +292 -0
- package/data/guides/density-toggle.md +46 -0
- package/data/guides/detail-panel.md +195 -0
- package/data/guides/display-columns.md +135 -0
- package/data/guides/editing.md +367 -0
- package/data/guides/expanding-sub-rows.md +194 -0
- package/data/guides/full-screen-toggle.md +63 -0
- package/data/guides/global-filtering.md +237 -0
- package/data/guides/localization.md +57 -0
- package/data/guides/memoization.md +157 -0
- package/data/guides/pagination.md +171 -0
- package/data/guides/row-actions.md +116 -0
- package/data/guides/row-numbers.md +24 -0
- package/data/guides/row-ordering-dnd.md +51 -0
- package/data/guides/row-pinning.md +96 -0
- package/data/guides/row-selection.md +237 -0
- package/data/guides/sorting.md +190 -0
- package/data/guides/state-management.md +165 -0
- package/data/guides/sticky-header.md +41 -0
- package/data/guides/table-event-listeners.md +103 -0
- package/data/guides/toolbar-customization.md +251 -0
- package/data/guides/virtualization.md +183 -0
- package/data/index.json +1930 -0
- package/data/reference/mrt-components.md +183 -0
- package/data/reference/mrt-hooks.md +125 -0
- package/data/skills/composable-components/SKILL.md +189 -0
- package/data/skills/customization/SKILL.md +190 -0
- package/data/skills/drag-and-drop-ordering/SKILL.md +227 -0
- package/data/skills/editing/SKILL.md +243 -0
- package/data/skills/filtering/SKILL.md +213 -0
- package/data/skills/getting-started/SKILL.md +213 -0
- package/data/skills/localization/SKILL.md +182 -0
- package/data/skills/migrate-v3-to-v4/SKILL.md +161 -0
- package/data/skills/state-and-server-data/SKILL.md +200 -0
- package/data/skills/virtualization/SKILL.md +203 -0
- package/dist/data.js +137 -0
- package/dist/index.js +232 -0
- package/package.json +50 -0
package/README.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# @mini_7/material-react-table-mcp
|
|
2
|
+
|
|
3
|
+
An [MCP](https://modelcontextprotocol.io) server that gives AI coding agents an exact reference for [Material React Table V4](https://github.com/gyminii/material-react-table) (`@mini_7/material-react-table`).
|
|
4
|
+
It serves the same data as the docs site: the API pages, every feature guide, the components and hooks reference, the source of every runnable example, the V3 to V4 migration guide, and the agent skills bundled with the library.
|
|
5
|
+
|
|
6
|
+
## Tools
|
|
7
|
+
|
|
8
|
+
| Tool | Purpose |
|
|
9
|
+
| --- | --- |
|
|
10
|
+
| `search_mrt_api` | Search table options, column options, state slices, and instance methods by name or description. |
|
|
11
|
+
| `get_mrt_api` | Exact lookup of one entry: type, default, source library, description, docs link. |
|
|
12
|
+
| `list_mrt_api` | List one category, optionally filtered by a name prefix such as `mui`, `render`, `enable`, or `on`. |
|
|
13
|
+
| `get_mrt_migration_guide` | The full `MIGRATION.md` for moving from `material-react-table` V3 to V4. |
|
|
14
|
+
| `get_mrt_skill` | The `SKILL.md` guides shipped in `@mini_7/material-react-table/skills`. |
|
|
15
|
+
| `search_mrt_docs` | Find which guide, reference page, skill, or example covers a topic, and which tool returns it. |
|
|
16
|
+
| `get_mrt_guide` | One of the 38 feature guides as Markdown, with its relevant options expanded and its live examples named. Call without a name to list them. |
|
|
17
|
+
| `get_mrt_reference` | The MRT components or MRT hooks reference page. |
|
|
18
|
+
| `get_mrt_example` | The full TypeScript source of one of the 113 docs examples. Call without an id to list them with the guides that embed each one. |
|
|
19
|
+
|
|
20
|
+
## Setup
|
|
21
|
+
|
|
22
|
+
Claude Code:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
claude mcp add material-react-table -- npx -y @mini_7/material-react-table-mcp
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Any client that launches stdio servers:
|
|
29
|
+
|
|
30
|
+
```json
|
|
31
|
+
{
|
|
32
|
+
"mcpServers": {
|
|
33
|
+
"material-react-table": {
|
|
34
|
+
"command": "npx",
|
|
35
|
+
"args": ["-y", "@mini_7/material-react-table-mcp"]
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Node 22.12 or newer is required.
|
|
42
|
+
|
|
43
|
+
## Skills without the server
|
|
44
|
+
|
|
45
|
+
The library package ships the same skills for [TanStack Intent](https://www.npmjs.com/package/@tanstack/intent).
|
|
46
|
+
In a project that has `@mini_7/material-react-table` installed:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
npx @tanstack/intent@latest list
|
|
50
|
+
npx @tanstack/intent@latest load @mini_7/material-react-table#getting-started
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Any other harness can install them with the [skills CLI](https://github.com/vercel-labs/skills):
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
npx skills add https://github.com/gyminii/material-react-table/tree/v4/packages/material-react-table/skills -a codex
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Development
|
|
60
|
+
|
|
61
|
+
From this directory in the monorepo:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
pnpm build # regenerates data/ from the docs prop tables, MIGRATION.md and skills, then compiles
|
|
65
|
+
pnpm test # starts the built server and exercises every tool
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
`data/` is generated; edit the docs prop tables under `apps/material-react-table-docs/components/prop-tables`, the MDX pages under `apps/material-react-table-docs/pages/docs`, or the examples under `apps/material-react-table-docs/examples` instead. Guides are rendered from MDX to Markdown at build time: imports and the `Head` block are dropped, `*OptionsTable` components become option lists, and embedded examples become pointers to `get_mrt_example`.
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# Migration guide
|
|
2
|
+
|
|
3
|
+
## Migrating to V4 from V3 (Material UI V9 and TanStack Table V9)
|
|
4
|
+
|
|
5
|
+
Material React Table V4 is the first release published as `@mini_7/material-react-table`.
|
|
6
|
+
It targets Material UI V9 and Material UI X Date Pickers V9.
|
|
7
|
+
It also moves from TanStack Table V8 to TanStack Table V9 (see section 8).
|
|
8
|
+
|
|
9
|
+
### 1. Upgrade Material UI first
|
|
10
|
+
|
|
11
|
+
Follow the official guides, in order, before touching this package:
|
|
12
|
+
|
|
13
|
+
- [Material UI: upgrade to v7](https://mui.com/material-ui/migration/upgrade-to-v7/)
|
|
14
|
+
- [Material UI: upgrade to v9](https://mui.com/material-ui/migration/upgrade-to-v9/)
|
|
15
|
+
- [Date Pickers: v7 to v8](https://mui.com/x/migration/migration-pickers-v7/)
|
|
16
|
+
- [Date Pickers: v8 to v9](https://mui.com/x/migration/migration-pickers-v8/)
|
|
17
|
+
|
|
18
|
+
Material UI's own codemods handle most of it:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npx @mui/codemod@latest v9.0.0/system-props <path>
|
|
22
|
+
npx @mui/codemod@latest deprecations/all <path>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### 2. Switch the package
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npm uninstall material-react-table
|
|
29
|
+
npm install @mini_7/material-react-table @mui/material@^9 @mui/icons-material@^9 @mui/x-date-pickers@^9
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Update every import:
|
|
33
|
+
|
|
34
|
+
```diff
|
|
35
|
+
-import { MaterialReactTable } from 'material-react-table';
|
|
36
|
+
-import { MRT_Localization_DE } from 'material-react-table/locales/de';
|
|
37
|
+
+import { MaterialReactTable } from '@mini_7/material-react-table';
|
|
38
|
+
+import { MRT_Localization_DE } from '@mini_7/material-react-table/locales/de';
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### 3. Peer dependency floors
|
|
42
|
+
|
|
43
|
+
| Peer | V3 | V4 |
|
|
44
|
+
|---|---|---|
|
|
45
|
+
| `@mui/material` | `>=6` | `>=9.0` |
|
|
46
|
+
| `@mui/icons-material` | `>=6` | `>=9.0` |
|
|
47
|
+
| `@mui/x-date-pickers` | `>=7.15` | `>=9.0` |
|
|
48
|
+
| `react`, `react-dom` | `>=18.0` | `>=18.0` (unchanged) |
|
|
49
|
+
| `@emotion/react`, `@emotion/styled` | `>=11.13` | `>=11.13` (unchanged) |
|
|
50
|
+
|
|
51
|
+
Node 20.10 or newer is required to build the package from source.
|
|
52
|
+
|
|
53
|
+
### 4. Text field props moved to `slotProps`
|
|
54
|
+
|
|
55
|
+
Material UI V9 removed `InputProps`, `inputProps`, `SelectProps`, `InputLabelProps` and `FormHelperTextProps` from `TextField`.
|
|
56
|
+
The same applies to the three MRT options typed as `TextFieldProps`: `muiEditTextFieldProps`, `muiFilterTextFieldProps` and `muiSearchTextFieldProps`.
|
|
57
|
+
|
|
58
|
+
```diff
|
|
59
|
+
muiSearchTextFieldProps={{
|
|
60
|
+
- InputProps: { startAdornment: <SearchIcon /> },
|
|
61
|
+
- inputProps: { 'aria-label': 'Search' },
|
|
62
|
+
- InputLabelProps: { shrink: true },
|
|
63
|
+
+ slotProps: {
|
|
64
|
+
+ input: { startAdornment: <SearchIcon /> },
|
|
65
|
+
+ htmlInput: { 'aria-label': 'Search' },
|
|
66
|
+
+ inputLabel: { shrink: true },
|
|
67
|
+
+ },
|
|
68
|
+
}}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
MRT merges your `slotProps.input`, `slotProps.htmlInput` and `slotProps.select` objects after its own defaults, and composes `sx` the same way it did for `InputProps.sx`.
|
|
72
|
+
Only the object form of a slot entry is supported for these three options; the function form `(ownerState) => props` is ignored because MRT has no `ownerState` to call it with.
|
|
73
|
+
|
|
74
|
+
### 5. Date picker prop types are no longer generic
|
|
75
|
+
|
|
76
|
+
`muiFilterDatePickerProps`, `muiFilterDateTimePickerProps` and `muiFilterTimePickerProps` are now typed with the non-generic `DatePickerProps`, `DateTimePickerProps` and `TimePickerProps`.
|
|
77
|
+
|
|
78
|
+
```diff
|
|
79
|
+
-const props: DatePickerProps<Dayjs> = { ... };
|
|
80
|
+
+const props: DatePickerProps = { ... };
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
The date, datetime and time filter inputs now render the accessible `PickersTextField` (section based) that pickers V9 makes mandatory.
|
|
84
|
+
If you passed a custom `slots.textField` to a filter picker it must be compatible with `PickersTextFieldProps`.
|
|
85
|
+
|
|
86
|
+
### 6. Package entry points
|
|
87
|
+
|
|
88
|
+
The package now declares an `exports` map with separate ESM (`.mjs`) and CommonJS (`.js`) builds.
|
|
89
|
+
Supported specifiers are `@mini_7/material-react-table`, `@mini_7/material-react-table/locales/<code>` and `@mini_7/material-react-table/package.json`.
|
|
90
|
+
Deep imports into `dist/` or `src/` are no longer resolvable.
|
|
91
|
+
|
|
92
|
+
This also fixes server-side rendering with date filters when the application imports `@mui/x-date-pickers` as ESM.
|
|
93
|
+
V3 loaded the CommonJS pickers build from its own bundle, which created a second `LocalizationProvider` context and threw "MUI X error #149" during SSR with pickers V8 or newer.
|
|
94
|
+
|
|
95
|
+
### 7. Everything else
|
|
96
|
+
|
|
97
|
+
All other `mui*Props` options pass straight through to the corresponding Material UI component, so Material UI's own V7 and V9 migration notes apply to whatever you pass there.
|
|
98
|
+
Behaviour changes worth checking in your app come from Material UI itself, most notably: `ButtonBase` now bubbles a click to ancestors on Enter and Space, `Menu` keyboard navigation moves `tabindex`, `TextField select` renders its label as a `div`, and `Autocomplete` with `freeSolo` may pass a `string` to `getOptionLabel`.
|
|
99
|
+
|
|
100
|
+
### 8. TanStack Table V9
|
|
101
|
+
|
|
102
|
+
V4 is built on TanStack Table V9 (`@tanstack/react-table` 9.2.4), up from V8.
|
|
103
|
+
The V9 packages are ESM-only, so the CommonJS build of this package now requires Node 22.12 or newer (`require()` of ES modules). The `engines` field says `>=22.12`.
|
|
104
|
+
Most of your code keeps working unchanged. The table below lists everything that was renamed; each is a straight find and replace.
|
|
105
|
+
|
|
106
|
+
| V3 (TanStack 8) | V4 (TanStack 9) |
|
|
107
|
+
| --- | --- |
|
|
108
|
+
| `initialState: { columnPinning: { left: [...], right: [...] } }` | `columnPinning: { start: [...], end: [...] }` |
|
|
109
|
+
| `column.pin('left')` / `column.pin('right')` | `column.pin('start')` / `column.pin('end')` |
|
|
110
|
+
| `column.getIsPinned() === 'left'` | `column.getIsPinned() === 'start'` |
|
|
111
|
+
| `table.getLeftLeafColumns()` and the other `getLeft*` / `getRight*` methods | `table.getStartLeafColumns()` and `getStart*` / `getEnd*` |
|
|
112
|
+
| `row.getLeftVisibleCells()` / `row.getRightVisibleCells()` | `row.getStartVisibleCells()` / `row.getEndVisibleCells()` |
|
|
113
|
+
| `columnSizingInfo` state, `onColumnSizingInfoChange`, `table.setColumnSizingInfo()` | `columnResizing`, `onColumnResizingChange`, `table.setColumnResizing()` |
|
|
114
|
+
| `sortingFn` column option | `sortFn` |
|
|
115
|
+
| `sortingFns` table option | `sortFns` |
|
|
116
|
+
| `column.getSortingFn()` / `column.getAutoSortingFn()` | `column.getSortFn()` / `column.getAutoSortFn()` |
|
|
117
|
+
| `table.getPrePaginationRowModel()` / `table.getPaginationRowModel()` | `table.getPrePaginatedRowModel()` / `table.getPaginatedRowModel()` |
|
|
118
|
+
| `column.getAggregationFn()` | `column.getAggregationFns()` |
|
|
119
|
+
| `MRT_SortingFn` type | `MRT_SortFn` (the old name is kept as a deprecated alias) |
|
|
120
|
+
| `MRT_ColumnSizingInfoState` type | `MRT_ColumnResizingState` (the old name is kept as a deprecated alias) |
|
|
121
|
+
|
|
122
|
+
Behaviour changes to check:
|
|
123
|
+
|
|
124
|
+
- `rowSelection` state values are typed `true` instead of `boolean`. Toggle a row by deleting its key rather than setting it to `false`.
|
|
125
|
+
- `rowPinning` state requires both `top` and `bottom` arrays, and `columnPinning` requires both `start` and `end`, when you pass them in `initialState` or `state`.
|
|
126
|
+
- `table.getIsSomeRowsSelected()` now returns `true` when all rows are selected. For an indeterminate checkbox use `getIsSomeRowsSelected() && !getIsAllRowsSelected()`.
|
|
127
|
+
- A custom `aggregationFn` is an object `{ aggregate: (context) => result }` instead of a `(columnId, leafRows, childRows) => result` callable. The built-in names (`'sum'`, `'mean'`, ...) and arrays of names work as before.
|
|
128
|
+
- The `getCoreRowModel`, `getFilteredRowModel`, `getSortedRowModel`, `getPaginationRowModel`, `getExpandedRowModel`, `getGroupedRowModel` and `getFaceted*` table options no longer exist. The row models are always registered; use the `manual*` options to take over a stage.
|
|
129
|
+
- Rows with a detail panel now report `row.getCanExpand()` as `true`, because V9 refuses to toggle a row that cannot expand.
|
|
130
|
+
Pass your own `getRowCanExpand` to override this.
|
|
131
|
+
- `onStateChange` and `table.setState()` no longer exist. Control individual slices with `state` plus the matching `onXChange` option.
|
|
132
|
+
- `table.getState()` still works and returns the full current state. Inside render code `table.state` is the reactive equivalent.
|
|
133
|
+
- Pinned cells are positioned with `insetInlineStart` and `insetInlineEnd`, so right-to-left layouts pin to the logical start and end of the row.
|
|
134
|
+
|
|
135
|
+
Both this package and the TanStack V9 packages ship agent skills for AI coding assistants; run `npx @tanstack/intent@latest list` in your project to see them.
|
|
136
|
+
The `migrate-v3-to-v4` skill covers everything on this page, and the `@mini_7/material-react-table-mcp` server answers exact option lookups.
|