Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
367 commits
Select commit Hold shift + click to select a range
124c92b
package upgrades
KevinVandy Dec 5, 2023
090c97a
Upgrade Examples
KevinVandy Dec 5, 2023
01df58b
Add hebrew localization (#855)
AlonMiz Dec 7, 2023
87a84c7
add disabled props to TablePagination (#858)
HanJaeJoon Dec 8, 2023
3a80f18
fix typos in docs (#865)
HanJaeJoon Dec 8, 2023
e6531fc
refactor display column hook
KevinVandy Dec 12, 2023
950bb0b
fix horizontal scrollbar showing with resizing
KevinVandy Dec 13, 2023
43e68ee
Upgrade Examples
KevinVandy Dec 13, 2023
4ecaeac
fix type
KevinVandy Dec 13, 2023
c83ef6e
story to show muiEditTextFieldProps.onClick working
KevinVandy Dec 13, 2023
d69c69d
add dynamic columns example
KevinVandy Dec 15, 2023
eeb26bc
release v2.0.6
KevinVandy Dec 15, 2023
da52088
Upgrade Examples
KevinVandy Dec 15, 2023
5ad6803
release v2.1.0 - better rtl column resizing
KevinVandy Dec 22, 2023
05ba9ef
Upgrade Examples
KevinVandy Dec 22, 2023
ad6acbe
fix: Encountered two children with the same key (#891)
dangkhoa99 Dec 26, 2023
5a3de30
progress on fixed height virtualization option
KevinVandy Jan 1, 2024
8da153f
abandon fixed row height virtualization because its buggy
KevinVandy Jan 1, 2024
4fc1fad
Upgrade Examples
KevinVandy Jan 1, 2024
9d33175
add mrt hooks docs
KevinVandy Jan 1, 2024
457ad60
release v2.2.0 - virtualization and row hooks
KevinVandy Jan 2, 2024
3f9239f
Upgrade Examples
KevinVandy Jan 2, 2024
8d50579
Fix createDisplayMode='row' not working with virtualization (#896)
dangkhoa99 Jan 2, 2024
154f93e
release v2.3.0 - visibleInShowHideMenu
KevinVandy Jan 2, 2024
6643ad3
Upgrade Examples
KevinVandy Jan 2, 2024
1209118
fix: fix warning virtualIndex in MRT_TableBodyCell (#900)
dangkhoa99 Jan 2, 2024
8d01008
Fix row selection with mrt-row-create (#902)
dangkhoa99 Jan 2, 2024
189a765
release v2.3.1 - vir bug fixes
KevinVandy Jan 2, 2024
490d917
Upgrade Examples
KevinVandy Jan 2, 2024
eb8cab0
Fix pagination props being invalid in docs (#907)
Rishi556 Jan 4, 2024
82120c0
Feat: creating row with external button (#903)
dangkhoa99 Jan 4, 2024
0dd6452
fix crash when scroll after pin row in table enable row virtualizatio…
dangkhoa99 Jan 4, 2024
20bc9b0
allow column action button children override (#912)
nir-cohe Jan 4, 2024
ffb5172
add datetime and datetime-range filter variants (#905)
noam3127 Jan 4, 2024
05822e7
column vir reorg and time filter variants
KevinVandy Jan 4, 2024
390be93
Upgrade Examples
KevinVandy Jan 4, 2024
d0574fe
release v2.4.0
KevinVandy Jan 4, 2024
1a3c71a
Upgrade Examples
KevinVandy Jan 4, 2024
93b9dcc
fixes #418
KevinVandy Jan 4, 2024
30a2309
simplify virtualizer types
KevinVandy Jan 5, 2024
2b5d3de
make pagination component props consistent
KevinVandy Jan 5, 2024
e9a3dd7
deprecate MRT_Virtualizer type in favor of specific ones
KevinVandy Jan 5, 2024
64dd481
Fixed Show clear filter menu if emptyModes filter fns is selected (#914)
alexzrp Jan 5, 2024
545bf47
release v2.4.1
KevinVandy Jan 5, 2024
d366f0a
Upgrade Examples
KevinVandy Jan 5, 2024
06698d5
add charts example
KevinVandy Jan 6, 2024
65807c5
fix page title
KevinVandy Jan 6, 2024
d3c1244
Implement single column grouping UI with groupingColumnMode remove (#…
KevinVandy Jan 6, 2024
4f44214
Fix default SelectProps overwritten if defined in muiFilterTextFieldP…
igor-dnascript Jan 6, 2024
09b925b
remove duplicated row drag handle code
KevinVandy Jan 6, 2024
b57ea24
simplify cell value rendering logic more
KevinVandy Jan 7, 2024
7941b76
different default removed grouping header
KevinVandy Jan 7, 2024
4e54ec9
fix row deselect subrows error
KevinVandy Jan 7, 2024
24166b3
fix more grouping selection bugs
KevinVandy Jan 7, 2024
e29c5f7
add way to modify grouped cells in remove mode
KevinVandy Jan 7, 2024
f612554
fix global filter placement in some media queries
KevinVandy Jan 7, 2024
ba9295a
added staticRowIndex to select props params
KevinVandy Jan 7, 2024
b585579
separate story for expand header customization
KevinVandy Jan 7, 2024
b0d6096
add groupedColumnMode story variation to aggregation stories
KevinVandy Jan 7, 2024
93cb964
release v2.5.0 - new alt grouping UIs
KevinVandy Jan 8, 2024
2515965
Upgrade Examples
KevinVandy Jan 8, 2024
8adbca3
update docs sitemap
KevinVandy Jan 8, 2024
2a4eefb
update docs sitemap
KevinVandy Jan 8, 2024
a9e94cc
add plausible link
KevinVandy Jan 9, 2024
b601594
update usage docs
KevinVandy Jan 9, 2024
5d15a34
fix compile
KevinVandy Jan 9, 2024
8e1b119
fix missing dep in example
KevinVandy Jan 9, 2024
8d782fa
Changed guide for customizing components to include reference to cust…
65001 Jan 9, 2024
98411d2
fixes #668
KevinVandy Jan 9, 2024
77161aa
fixes #717
KevinVandy Jan 9, 2024
00f6bb3
Fixed space char after change from empty filter to equal, contains fi…
alexzrp Jan 9, 2024
570e0d2
storybook: implement multi row selection with hold shift (#917)
dangkhoa99 Jan 9, 2024
ce78b6f
fixes #706
KevinVandy Jan 9, 2024
a57db51
fixes #926
KevinVandy Jan 9, 2024
26a49cd
release v2.5.1 - bug fixes
KevinVandy Jan 9, 2024
7b863a9
Upgrade Examples
KevinVandy Jan 9, 2024
948e5ca
fix: date and time picker filters on mobile screensizes (#930)
chmelevskij Jan 10, 2024
bf7c36a
release v2.5.2
KevinVandy Jan 10, 2024
5add3f9
Upgrade Examples
KevinVandy Jan 10, 2024
9233ace
Fix typo in about.mdx (#933)
imnasnainaec Jan 10, 2024
bb9e7e7
container height dimension story
KevinVandy Jan 11, 2024
e096524
progress on virtualized detail panels and other bug fixes
KevinVandy Jan 11, 2024
44789c6
fix header group sizes
KevinVandy Jan 11, 2024
e5953b0
Upgrade Examples
KevinVandy Jan 11, 2024
3530073
release v2.6.0 and better detail panel docs
KevinVandy Jan 11, 2024
4e5587a
release v2.6.1 - SSR document bugfix
KevinVandy Jan 12, 2024
e35b104
Upgrade Examples
KevinVandy Jan 12, 2024
5014344
improve detail panel virtualization docs
KevinVandy Jan 12, 2024
17985c9
code cleanup
KevinVandy Jan 12, 2024
e0d130d
add lazy detail panel example
KevinVandy Jan 13, 2024
e4ed069
add lazy sub-rows example
KevinVandy Jan 14, 2024
cba00f1
delay locally
KevinVandy Jan 14, 2024
414aacd
add positionCreatingRow table option
KevinVandy Jan 16, 2024
cd80b02
add explicit conditional styling docs
KevinVandy Jan 16, 2024
4885598
remove internal barrel import/export files
KevinVandy Jan 17, 2024
3d476bd
set agg example groupedColumn mode back to default
KevinVandy Jan 17, 2024
d44a3cb
fix row removal page index bug
KevinVandy Jan 17, 2024
032b6e6
polish upcoming positionCreatingRow feature
KevinVandy Jan 17, 2024
2cb84e8
release v2.7.0
KevinVandy Jan 18, 2024
d885c47
Upgrade Examples
KevinVandy Jan 18, 2024
6b9b6d7
upgrade packages
KevinVandy Jan 18, 2024
0799d4b
reorganize package folder structure
KevinVandy Jan 18, 2024
ec17f00
fix docs claim about default sorting function (#947)
andreimatei Jan 18, 2024
185bcbd
MRT Display Columns with better column resizing performance and less …
KevinVandy Jan 19, 2024
a447cc0
regen lock file
KevinVandy Jan 19, 2024
2481a5e
Upgrade Examples
KevinVandy Jan 19, 2024
d2e1aca
create stories showing conditional display columns
KevinVandy Jan 19, 2024
eb9337d
attempt to fix header group widths more
KevinVandy Jan 20, 2024
64c2087
change editSelectOptions to allow callback
KevinVandy Jan 20, 2024
3b20149
fixes #654
KevinVandy Jan 20, 2024
ccb328f
use cached column defs while row or column dragging
KevinVandy Jan 20, 2024
9526ae5
add column grow option
KevinVandy Jan 20, 2024
fb33cd7
fixes #939
KevinVandy Jan 20, 2024
e367de8
release v2.8.0 - grow and unmemoize
KevinVandy Jan 20, 2024
cff421d
Upgrade Examples
KevinVandy Jan 20, 2024
be89be8
refactor edit select logic
KevinVandy Jan 20, 2024
fd7ff3a
optimize column virtualizer and disabled conditional virtualization
KevinVandy Jan 21, 2024
5a1444a
better column sizing docs, better data column docs
KevinVandy Jan 21, 2024
1bd3998
show complete row actions complete render override
KevinVandy Jan 21, 2024
17a6d78
remove extra column group header length
KevinVandy Jan 22, 2024
a8391d6
progress on selection pinned transparency bug
KevinVandy Jan 22, 2024
627fbc5
progress on pinned selection bug
KevinVandy Jan 24, 2024
cdb9e18
Upgrade Examples
KevinVandy Jan 24, 2024
1a633e9
Improve Accessibility - captions (#957)
lalong13 Jan 24, 2024
1cfdea4
update caption stuff and upcoming changelog
KevinVandy Jan 24, 2024
7fbe53e
release v2.9.0
KevinVandy Jan 24, 2024
2eba2d2
Upgrade Examples
KevinVandy Jan 24, 2024
9dd680e
move table options logic
KevinVandy Jan 25, 2024
7e83646
release v2.9.1 - fix row selection highlighting logic on grouped rows
KevinVandy Jan 25, 2024
4b6378e
Upgrade Examples
KevinVandy Jan 25, 2024
eb46f50
fix a bunch of CSS bugs
KevinVandy Jan 26, 2024
ebfb5f5
revert turbo.json
KevinVandy Jan 26, 2024
f522f60
remove after styles if not applied
KevinVandy Jan 26, 2024
fdc1b7b
release v2.9.2
KevinVandy Jan 26, 2024
148d144
Upgrade Examples
KevinVandy Jan 26, 2024
44077fc
measure table headers instead of table cells for col virtualization
KevinVandy Jan 26, 2024
6e12a39
work on column order state stuff
KevinVandy Jan 29, 2024
407eb15
Cell actions feature (#963)
KevinVandy Jan 29, 2024
b77c69c
Toggle all columns visible issue fixed (#966)
Menghini Jan 30, 2024
3a6fb00
progress on cell action docs, but not shipping yet. I need sleep
KevinVandy Jan 30, 2024
2854a64
give display column show functions stable boolean returns
KevinVandy Jan 30, 2024
68ec92e
new docs guides structure, rewrite memoization guide
KevinVandy Jan 30, 2024
49bc9e1
cell actions example, fix more edge cases with column order state
KevinVandy Jan 31, 2024
e1e3631
release v2.10.0
KevinVandy Jan 31, 2024
7cd340b
Upgrade Examples
KevinVandy Jan 31, 2024
82e7e0a
doc use mrt effects, add plausible to sb
KevinVandy Jan 31, 2024
e07fb89
detail panel docs improvements
KevinVandy Jan 31, 2024
fe782f0
code cleanup
KevinVandy Feb 2, 2024
9b085d5
batch row selection feature, export
KevinVandy Feb 5, 2024
b248acf
Upgrade Examples
KevinVandy Feb 5, 2024
99ff761
Added autocompleteValue useState variable to store full newValue and …
dmitry-simple-it Feb 5, 2024
805227d
release v2.11.0
KevinVandy Feb 5, 2024
c404f7d
Upgrade Examples
KevinVandy Feb 5, 2024
87b2cc8
fix extra bulk row selection events
KevinVandy Feb 5, 2024
401d1ed
release v2.11.1 - batch select bug fix
KevinVandy Feb 5, 2024
7e3a31a
Upgrade Examples
KevinVandy Feb 5, 2024
33f8bb7
update roadmap
KevinVandy Feb 5, 2024
cc32333
fix link typo
KevinVandy Feb 5, 2024
8386cdd
fix link in docs (#976)
andreimatei Feb 5, 2024
3d33091
fix: wrong field used in example (#978)
arung-agamani Feb 6, 2024
3ecdff5
release v2.11.2 - row pinning fixes
KevinVandy Feb 9, 2024
4911052
Upgrade Examples
KevinVandy Feb 9, 2024
613245a
changelog
KevinVandy Feb 9, 2024
35fe3cf
fix clear selection button to clear all pages
KevinVandy Feb 9, 2024
b3be685
small mrt theme refactor
KevinVandy Feb 10, 2024
3d3b968
update to TanStack Table v8.12.0
KevinVandy Feb 14, 2024
a2575cc
Upgrade Examples
KevinVandy Feb 14, 2024
a03cfde
release v2.11.3
KevinVandy Feb 15, 2024
1a2587e
Upgrade Examples
KevinVandy Feb 15, 2024
362a673
upgrade to tanstack virtual v3.1.1
KevinVandy Feb 19, 2024
f615bbf
Upgrade Examples
KevinVandy Feb 19, 2024
e4925ad
renderToolbarAlertBannerContent in table options docs
KevinVandy Feb 19, 2024
fc1650f
dvh fullscreen styles
KevinVandy Feb 20, 2024
3e4d421
update dynamic columns example
KevinVandy Feb 24, 2024
b7841f1
filterSelectOptions filter tooltip displays label (#997)
loughlinclaus3 Feb 24, 2024
d573ef7
Fix dnd ghost going back on drop (#1000)
aarjithn Feb 26, 2024
f705a2d
rework filter tooltip label logic
KevinVandy Feb 26, 2024
d02abcc
refactor column info stuff
KevinVandy Feb 26, 2024
6b575cc
Upgrade Examples
KevinVandy Feb 26, 2024
842260f
release v2.12.0
KevinVandy Feb 26, 2024
83d0069
Update filterVariant type options (#1004)
imnasnainaec Feb 26, 2024
20cf3de
docs: Update virtualization.mdx (#1010)
imnasnainaec Feb 27, 2024
959e7f7
upgrade to tanstack table v8.13
KevinVandy Feb 27, 2024
2c92df0
Upgrade Examples
KevinVandy Feb 27, 2024
de8dc86
Add Croatian locale (#1011)
renatoka Feb 28, 2024
c31ae22
add state management for header group visibility (#1009)
ThisIsHG Feb 28, 2024
922e45e
work on visibility stuff
KevinVandy Feb 28, 2024
5130880
fix rangeFilterIndex undefined and fix column visibility stuff
KevinVandy Feb 28, 2024
51fd971
Upgrade Examples
KevinVandy Feb 28, 2024
e572e0d
release v2.12.1
KevinVandy Feb 28, 2024
11ab02a
package upgrades
KevinVandy Mar 6, 2024
8afb0f4
Upgrade Examples
KevinVandy Mar 6, 2024
ce98410
disable "save" button when "isSaving" is true (#1032)
loughlinclaus3 Mar 6, 2024
8de777f
no row models if manual
KevinVandy Mar 13, 2024
9d7e42e
Storybook 8 upgrade (#1047)
KevinVandy Mar 18, 2024
bcdae14
Upgrade Examples
KevinVandy Mar 18, 2024
ee5b2c2
upgrade to TanStack Table v8.14.0
KevinVandy Mar 20, 2024
629d937
Upgrade Examples
KevinVandy Mar 20, 2024
2b8914c
package upgrades
KevinVandy Mar 26, 2024
a0dd1bf
Upgrade Examples
KevinVandy Mar 26, 2024
943961b
really small typo fix (#1066)
rikusen0335 Mar 27, 2024
41af73e
typo fix (#1071)
amv1017 Mar 28, 2024
3b2eeb6
Update best-practices.mdx (#1098)
andreawesleyciardi Apr 16, 2024
e51d15b
package upgrades
KevinVandy Apr 18, 2024
b33f4c4
Upgrade Examples
KevinVandy Apr 18, 2024
7aa7799
Update pl.ts (#1089)
MarekPatyna Apr 18, 2024
4eade9d
fix(docs/index): overflow issue in install command (#1095)
sudokoi Apr 18, 2024
c60afb0
Fixed theme index in fullscreen mode (#1048)
helt Apr 18, 2024
fea94c9
remove +1 on modal calc
KevinVandy Apr 18, 2024
c47471b
Added Greek language support (#1106)
sidkosmas Apr 18, 2024
f8dc5d8
release v2.13.0
KevinVandy Apr 18, 2024
85b98f9
Upgrade Examples
KevinVandy Apr 18, 2024
cdac7f8
package upgrades
KevinVandy Apr 26, 2024
13ed5bd
Upgrade Examples
KevinVandy Apr 26, 2024
41a7203
package upgrades
KevinVandy May 8, 2024
ed1b521
Upgrade Examples
KevinVandy May 8, 2024
9422d2b
Fix manual pagination link (#1130)
LICF01 May 11, 2024
99fc385
package upgrades
KevinVandy Jun 3, 2024
92c40b0
Upgrade Examples
KevinVandy Jun 3, 2024
dac97f8
fix https://github.com/KevinVandy/material-react-table/issues/1149 (#…
tmax22 Jun 7, 2024
e20ffca
fix: Update MRT_EditCellTextField.tsx (add custom SelectProps) (#1156)
truefeelz Jun 7, 2024
8a02c5a
edit only creating row example
KevinVandy Jun 12, 2024
0610c0a
chore: package and type upgrades
KevinVandy Jul 17, 2024
0264f46
Upgrade Examples
KevinVandy Jul 17, 2024
cf55cfb
Update row-selection.mdx (#1196)
rohit-sanaka Jul 23, 2024
d6253a6
docs: fix a typo in the documentation examples (#1189)
pa4080 Jul 28, 2024
bc32898
upgrade packages
KevinVandy Jul 28, 2024
196b637
fix: changes types to interface so they can be extended (#1178)
tt0mmy Jul 28, 2024
2d6d8c0
release v2.13.1
KevinVandy Jul 28, 2024
7c23a21
upgrade examples
KevinVandy Jul 29, 2024
e187f0a
limit example upgrade script to mrt
KevinVandy Aug 30, 2024
3eecd63
disable blur by pressing enter when compositioning (#1224)
akadateppei Aug 30, 2024
0c573a2
Added aria-sort to MRT_TableHeadCell (#1222)
Volene Aug 30, 2024
dbcf553
package upgrades excluding mui v6 and rollup
KevinVandy Aug 30, 2024
4b99f08
release v2.13.2
KevinVandy Aug 30, 2024
fe0510a
Upgrade Examples
KevinVandy Aug 30, 2024
32ca2b7
freeze install commands version
KevinVandy Aug 30, 2024
3dd9f11
clean up version numbers
KevinVandy Aug 31, 2024
2e148f2
fix again
KevinVandy Aug 31, 2024
354edcd
migration guide redirect
KevinVandy Aug 31, 2024
9cf4919
fix version value
KevinVandy Aug 31, 2024
13bcbd6
add compat table
KevinVandy Sep 5, 2024
00f1e8a
update install links
KevinVandy Sep 5, 2024
e6d27ac
Update no.ts (#1233)
superodde Sep 5, 2024
f7e3287
release v2.13.3
KevinVandy Sep 5, 2024
0e8b162
Upgrade Examples
KevinVandy Sep 5, 2024
6865c8b
add migrating to v3 messages
KevinVandy Sep 5, 2024
8d63152
disable upgrades
KevinVandy Sep 5, 2024
743e376
update plausible domain
KevinVandy Sep 5, 2024
1d5a3cc
fix NaN when number filter is cleared (#1260)
NarenderDhamarlapally Feb 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,5 @@ yarn-error.log*

# turbo
.turbo

*storybook.log
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This project uses PNPM and a TurboRepo with 2 projects.

### 1. Fork and Clone the project

Create your own fork, clone, and then make a feature/bugfix branch off of `main`. Branch name does not really matter.
Create your own fork, clone, and then make a feature/bugfix branch off of `v2`. Branch name does not really matter.

### 2. Install Dependencies

Expand Down Expand Up @@ -51,4 +51,4 @@ The Docs site will open on `port 3000` by default.
pnpm lib:build
```

> Note: After building the library, if you are running the docs site locally, it will use the compiled output of the dist folder. This can be annoying if you are trying to test changes to the library in the docs site itself. Just delete the `/dist` folder to test lib changes in the docs site.
> Note: After building the library, if you are running the docs site locally, it will use the compiled output of the dist folder. This can be annoying if you are trying to test changes to the library in the docs site itself. Just delete the `/dist` folder and restart the docs app to test lib changes in the docs site.
95 changes: 56 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Material React Table
# Material React Table V2

View [Documentation](https://www.material-react-table.com/)

Expand All @@ -17,39 +17,52 @@ View [Documentation](https://www.material-react-table.com/)
<a href="https://github.com/KevinVandy/material-react-table/blob/v2/LICENSE" target="_blank">
<img alt="" src="https://badgen.net/github/license/KevinVandy/material-react-table?color=blue" />
</a>
<a href="http://makeapullrequest.com" target="_blank">
<img alt="" src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square" />
<a
href="https://github.com/sponsors/kevinvandy"
target="_blank"
rel="noopener"
>
<img alt="" src="https://img.shields.io/badge/sponsor-violet" />
</a>
<a
href="https://discord.gg/5wqyRx6fnm"
target="_blank"
rel="noopener"
>
<img alt="" src="https://dcbadge.vercel.app/api/server/5wqyRx6fnm?style=flat">
</a>

## About

### _Quickly Create React Data Tables with Material Design_

### __Built with [Material UI <sup>V5</sup>](https://mui.com) and [TanStack Table <sup>V8</sup>](https://tanstack.com/table/v8)__
### **Built with [Material UI <sup>V5</sup>](https://mui.com) and [TanStack Table <sup>V8</sup>](https://tanstack.com/table/v8)**

<img src="https://material-react-table.com/banner.png" alt="MRT" height="50"/>
<img src="https://material-react-table.com/banner.png" alt="MRT" height="50" />

> Want to use Mantine instead of Material UI? Check out [Mantine React Table](https://www.mantine-react-table.com)

## Learn More

- Join the [Discord](https://discord.gg/5wqyRx6fnm) server to join in on the development discussion or ask questions
- View the [Docs Website](https://www.material-react-table.com/)
- See all [Props, Options, and APIs](https://www.material-react-table.com/docs/api)
- See all [Props, Options, APIs, Components, and Hooks](https://www.material-react-table.com/docs/api)

### Quick Examples

- [Basic Table](https://www.material-react-table.com/docs/examples/basic/) (See Default Features)
- [Minimal Table](https://www.material-react-table.com/docs/examples/minimal/) (Turn off Features like Pagination, Sorting, Filtering, and Toolbars)
- [Advanced Table](https://www.material-react-table.com/docs/examples/advanced/) (See some of the Advanced Features)
- [Aggregation/Grouping](https://www.material-react-table.com/docs/examples/aggregation-and-grouping/) (Aggregation features such as Sum, Average, Count, etc.)
- [Data Export Table](https://www.material-react-table.com/docs/examples/data-export/) (Export to CSV, Excel, etc.)
- [Editing CRUD Table](https://www.material-react-table.com/docs/examples/editing-crud/) (Create, Edit, and Delete Rows)
- [Remote Data](https://www.material-react-table.com/docs/examples/remote/) (Server-side Pagination, Sorting, and Filtering)
- [React Query](https://www.material-react-table.com/docs/examples/react-query/) (Server-side Pagination, Sorting, and Filtering, simplified)
- [Virtualized Rows](https://www.material-react-table.com/docs/examples/virtualized/) (10,000 rows at once!)
- [Infinite Scrolling](https://www.material-react-table.com/docs/examples/infinite-scrolling/) (Fetch data as you scroll)
- [Localization (i18n)](https://www.material-react-table.com/docs/guides/localization#built-in-locale-examples) (Over a dozen languages built-in)
- [Basic Table](https://www.material-react-table.com/docs/examples/basic/) (See Default Features)
- [Minimal Table](https://www.material-react-table.com/docs/examples/minimal/) (Turn off Features like Pagination, Sorting, Filtering, and Toolbars)
- [Advanced Table](https://www.material-react-table.com/docs/examples/advanced/) (See some of the Advanced Features)
- [Custom Headless Table](https://www.material-react-table.com/docs/examples/custom-headless/) (Build your own table markup)
- [Dragging / Ordering Examples](https://www.material-react-table.com/docs/examples/column-ordering/) (Drag and Drop)
- [Editing (CRUD) Examples](https://www.material-react-table.com/docs/examples/editing-crud/) (Create, Edit, and Delete Rows)
- [Expanding / Grouping Examples](https://www.material-react-table.com/docs/examples/aggregation-and-grouping/) (Sum, Average, Count, etc.)
- [Filtering Examples](https://www.material-react-table.com/docs/examples/filter-variants/) (Faceted Values, Switching Filters, etc.)
- [Sticky Pinning Examples](https://www.material-react-table.com/docs/examples/sticky-header/) (Sticky Headers, Sticky Columns, Sticky Rows, etc.)
- [Remote Data Fetching Examples](https://www.material-react-table.com/docs/examples/react-query/) (Server-side Pagination, Sorting, and Filtering)
- [Virtualized Examples](https://www.material-react-table.com/docs/examples/virtualized/) (10,000 rows at once!)
- [Infinite Scrolling](https://www.material-react-table.com/docs/examples/infinite-scrolling/) (Fetch data as you scroll)
- [Localization (i18n)](https://www.material-react-table.com/docs/guides/localization#built-in-locale-examples) (Over a dozen languages built-in)

View additional [storybook examples](https://www.material-react-table.dev/)

Expand All @@ -59,9 +72,10 @@ _All features can easily be enabled/disabled_

_**Fully Fleshed out [Docs](https://www.material-react-table.com/docs/guides#guides) are available for all features**_

- [x] < 47kb gzipped - [Bundlephobia](https://bundlephobia.com/package/material-react-table)
- [x] 30-56kb gzipped - [Bundlephobia](https://bundlephobia.com/package/material-react-table)
- [x] Advanced TypeScript Generics Support (TypeScript Optional)
- [x] Aggregation and Grouping (Sum, Average, Count, etc.)
- [x] Cell Actions (Right-click Context Menu)
- [x] Click To Copy Cell Values
- [x] Column Action Dropdown Menu
- [x] Column Hiding
Expand All @@ -70,7 +84,7 @@ _**Fully Fleshed out [Docs](https://www.material-react-table.com/docs/guides#gui
- [x] Column Resizing
- [x] Customize Icons
- [x] Customize Styling of internal Mui Components
- [x] Data Editing (4 different editing modes)
- [x] Data Editing and Creating (5 different editing modes)
- [x] Density Toggle
- [x] Detail Panels (Expansion)
- [x] Faceted Value Generation for Filter Options
Expand All @@ -85,6 +99,7 @@ _**Fully Fleshed out [Docs](https://www.material-react-table.com/docs/guides#gui
- [x] Row Actions (Your Custom Action Buttons)
- [x] Row Numbers
- [x] Row Ordering via Drag'n'Drop
- [x] Row Pinning
- [x] Row Selection (Checkboxes)
- [x] SSR compatible
- [x] Sorting (supports client-side and server-side)
Expand All @@ -99,12 +114,12 @@ _**Fully Fleshed out [Docs](https://www.material-react-table.com/docs/guides#gui

View the full [Installation Docs](https://www.material-react-table.com/docs/getting-started/install)

1. Ensure that you have React 17 or later installed (Material UI V5 requires React 17 or 18)
1. Ensure that you have React 18 or later installed

2. Install Peer Dependencies (Material UI V5)

```bash
npm install @mui/material @mui/icons-material @emotion/react @emotion/styled
npm install @mui/material @mui/x-date-pickers @mui/icons-material @emotion/react @emotion/styled
```

3. Install material-react-table
Expand All @@ -120,9 +135,13 @@ npm install material-react-table
> Read the full usage docs [here](https://www.material-react-table.com/docs/getting-started/usage/)

```jsx
import { useMemo, useRef, useState, useEffect } from 'react';
import { MaterialReactTable } from 'material-react-table';
import { useMemo, useState, useEffect } from 'react';
import {
MaterialReactTable,
useMaterialReactTable,
} from 'material-react-table';

//data must be stable reference (useState, useMemo, useQuery, defined outside of component, etc.)
const data = [
{
name: 'John',
Expand All @@ -132,7 +151,7 @@ const data = [
name: 'Sara',
age: 25,
},
]
];

export default function App() {
const columns = useMemo(
Expand Down Expand Up @@ -160,25 +179,23 @@ export default function App() {
//do something when the row selection changes
}, [rowSelection]);

//Or, optionally, you can get a reference to the underlying table instance
const tableInstanceRef = useRef(null);
const table = useMaterialReactTable({
columns,
data,
enableColumnOrdering: true, //enable some features
enableRowSelection: true,
enablePagination: false, //disable a default feature
onRowSelectionChange: setRowSelection, //hoist internal state to your own state (optional)
state: { rowSelection }, //manage your own state, pass it back to the table (optional)
});

const someEventHandler = () => {
//read the table state during an event from the table instance ref
console.log(tableInstanceRef.current.getState().sorting);
}
//read the table state during an event from the table instance
console.log(table.getState().sorting);
};

return (
<MaterialReactTable
columns={columns}
data={data}
enableColumnOrdering //enable some features
enableRowSelection
enablePagination={false} //disable a default feature
onRowSelectionChange={setRowSelection} //hoist internal state to your own state (optional)
state={{ rowSelection }} //manage your own state, pass it back to the table (optional)
tableInstanceRef={tableInstanceRef} //get a reference to the underlying table instance (optional)
/>
<MaterialReactTable table={table} /> //other more lightweight MRT sub components also available
);
}
```
Expand Down
53 changes: 34 additions & 19 deletions apps/material-react-table-docs/components/mdx/ComparisonTable.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { Box, Link } from '@mui/material';
import { MaterialReactTable, type MRT_ColumnDef } from 'material-react-table';
import { Box, Link, Paper } from '@mui/material';
import {
MRT_TableContainer,
type MRT_ColumnDef,
useMaterialReactTable,
} from 'material-react-table';

const columns: MRT_ColumnDef<(typeof data)[0]>[] = [
{
Expand All @@ -15,9 +19,11 @@ const columns: MRT_ColumnDef<(typeof data)[0]>[] = [
color:
cell.getValue() === 'Material React Table'
? theme.palette.primary.main
: cell.getValue() === 'TanStack Table (React Table)'
? theme.palette.secondary.light
: theme.palette.text.primary,
: cell.getValue() === 'Mantine React Table'
? theme.palette.secondary.light
: cell.getValue() === 'TanStack Table (React Table)'
? theme.palette.error.main
: theme.palette.text.primary,
fontWeight: 'bold',
textDecoration: 'none',
'&:hover': {
Expand Down Expand Up @@ -64,19 +70,31 @@ const data = [
library: 'Material React Table',
libraryLink: '#',
freeOrLicensed: 'Free MIT',
bundleSize: 47,
bundleSize: 53,
bundlePhobiaImg:
'https://badgen.net/bundlephobia/minzip/material-react-table@latest?color=blue',
bundlePhobiaLink:
'https://bundlephobia.com/package/material-react-table@latest',
description:
'Built on top of TanStack Table V8 and Material UI V5, Material React Table (MRT) is a batteries-included React table library that attempts to provide all the table features you need while trying to stay as highly performant and lightweight as possible. Customization is treated as a top priority to let you override any styles you need to change. Initially built in 2022, so it is still somewhat new.',
},
{
library: 'Mantine React Table',
libraryLink: 'https://www.mantine-react-table.com',
freeOrLicensed: 'Free MIT',
bundleSize: 48,
bundlePhobiaImg:
'https://badgen.net/bundlephobia/minzip/mantine-react-table@latest?color=blue',
bundlePhobiaLink:
'https://bundlephobia.com/package/mantine-react-table@latest',
description:
'Mantine React Table is Material React Table\'s sister library. It was forked from Material React Table and just uses Mantine instead of Material UI. If you want a more "pure" CSS component library to use with MRT, or you are a Tailwind user, then Mantine React Table might actually be a better fit for you.',
},
{
library: 'TanStack Table (React Table)',
libraryLink: 'https://tanstack.com/table',
freeOrLicensed: 'Free MIT',
bundleSize: 13,
bundleSize: 14,
bundlePhobiaImg:
'https://badgen.net/bundlephobia/minzip/@tanstack/react-table@latest',
bundlePhobiaLink:
Expand Down Expand Up @@ -110,7 +128,7 @@ const data = [
library: 'MUI X Data Grid MIT/Pro/Premium',
libraryLink: 'https://mui.com/store/items/mui-x-premium/',
freeOrLicensed: 'MIT or Paid License',
bundleSize: 123,
bundleSize: 135,
bundlePhobiaImg:
'https://badgen.net/bundlephobia/minzip/@mui/x-data-grid-pro?color=orange',
bundlePhobiaLink:
Expand All @@ -122,7 +140,7 @@ const data = [
library: 'AG Grid Community/Enterprise',
libraryLink: 'https://www.ag-grid.com/license-pricing',
freeOrLicensed: 'MIT or Paid License',
bundleSize: 270,
bundleSize: 332,
bundlePhobiaImg:
'https://badgen.net/bundlephobia/minzip/ag-grid-enterprise?color=red',
bundlePhobiaLink:
Expand All @@ -133,14 +151,11 @@ const data = [
];

export const ComparisonTable = () => {
return (
<MaterialReactTable
columns={columns}
data={data}
enablePagination={false}
enableColumnActions={false}
enableBottomToolbar={false}
enableTopToolbar={false}
/>
);
const table = useMaterialReactTable({
columns,
data,
enableColumnActions: false,
});

return <MRT_TableContainer component={Paper} table={table} />;
};
Loading