Table Options (Props)
Many of the options you can pass to
useMaterialReactTable
are the same as the ones you can pass to the TanStack Table useReactTable hook.
Here is a list of all the table options that you can pass to the useMaterialReactTable
hook.
const table = useMaterialReactTable({// all the options that you can pass here (recommended)});//or all of the props that could be passed to `<MaterialReactTable />` IF not using `useMaterialReactTable` hookreturn (<MaterialReactTable// all of the props that could be passed here if no `table` prop is passed/>);return <MaterialReactTable table={table} />; //recommended
# | Prop Name | Type | Default Value | More Info Links | |
---|---|---|---|---|---|
1 |
| TanStack Table Custom Features Docs | |||
2 |
| TanStack Table Grouping Docs | |||
3 |
| TanStack Table Core Table Docs | |||
4 |
| TanStack Table Expanding Docs | |||
5 |
| TanStack Table Pagination Docs | |||
6 |
| MRT Column Filtering Docs | |||
7 |
|
| MRT Column Resizing Docs | ||
8 |
|
| MRT Column Resizing Docs | ||
9 |
| MRT Column Options API Reference | |||
10 |
| ||||
11 |
| ||||
12 |
| Usage Docs | |||
13 |
|
| TanStack Table Core Table Docs | ||
14 |
|
| TanStack Table Core Table Docs | ||
15 |
|
| TanStack Table Core Table Docs | ||
16 |
|
| TanStack Table Core Table Docs | ||
17 |
|
| TanStack Table Core Table Docs | ||
18 |
| TanStack Table Core Table Docs | |||
19 |
| MRT Display Columns Docs | |||
20 |
| MRT Display Columns Docs | |||
21 |
|
| MRT Editing Docs | ||
22 |
|
| MRT Row Selection Docs | ||
23 |
|
| MRT Customize Toolbars Docs | ||
24 |
| ||||
25 |
|
| MRT Click to Copy Docs | ||
26 |
|
| MRT Column Actions Docs | ||
27 |
|
| MRT Column Ordering DnD Docs | ||
28 |
|
| MRT Column Filtering Docs | ||
29 |
|
| MRT Column Filtering Docs | ||
30 |
| MRT Column Ordering DnD Docs | |||
31 |
| ||||
32 |
| MRT Column Resizing Docs | |||
33 |
| MRT Virtualization Docs | |||
34 |
|
| MRT Density Toggle Docs | ||
35 |
| MRT Editing Docs | |||
36 |
|
| MRT Expanding Sub Rows Docs | ||
37 |
| MRT Expanding Sub Rows Docs | |||
38 |
|
| TanStack Filters Docs | ||
39 |
|
| MRT Column Filtering Docs | ||
40 |
|
| TanStack Filters Docs | ||
41 |
|
| MRT Full Screen Toggle Docs | ||
42 |
|
| MRT Global Filtering Docs | ||
43 |
|
| MRT Global Filtering Docs | ||
44 |
|
| MRT Global Filtering Docs | ||
45 |
| MRT Aggregation and Grouping Docs | |||
46 |
|
| MRT Column Hiding Docs | ||
47 |
|
| |||
48 |
| TanStack Sorting Docs | |||
49 |
|
| MRT Row Selection Docs | ||
50 |
| ||||
51 |
|
| |||
52 |
| ||||
53 |
| ||||
54 |
| Row Numbers Feature Guide | |||
55 |
| ||||
56 |
| ||||
57 |
| MRT Row Selection Docs | |||
58 |
| MRT Virtualization Docs | |||
59 |
|
| |||
60 |
|
| |||
61 |
|
| |||
62 |
| ||||
63 |
| ||||
64 |
|
| |||
65 |
|
| |||
66 |
|
| |||
67 |
|
| |||
68 |
|
| |||
69 |
| ||||
70 |
| TanStack Table Filters Docs | |||
71 |
|
| TanStack Filtering Docs | ||
72 |
| ||||
73 |
| TanStack Table Core Table Docs | |||
74 |
| ||||
75 |
| TanStack Table Filters Docs | |||
76 |
| TanStack Table Filters Docs | |||
77 |
| TanStack Table Filters Docs | |||
78 |
| TanStack Table Filters Docs | |||
79 |
| TanStack Table Grouping Docs | |||
80 |
| TanStack Table Expanding Docs | |||
81 |
| ||||
82 |
| TanStack Table Expanding Docs | |||
83 |
| TanStack Table Core Table Docs | |||
84 |
| TanStack Table Sorting Docs | |||
85 |
| TanStack Table Core Table Docs | |||
86 |
| ||||
87 |
| ||||
88 |
|
| TanStack Table Grouping Docs | ||
89 |
| ||||
90 |
| Table State Management Guide | |||
91 |
| TanStack Table Sorting Docs | |||
92 |
|
| |||
93 |
|
| TODO | ||
94 |
| Localization (i18n) Guide | |||
95 |
| TanStack Table Expanding Docs | |||
96 |
| TanStack Table Filters Docs | |||
97 |
| TanStack Table Grouping Docs | |||
98 |
| TanStack Table Pagination Docs | |||
99 |
| TanStack Table Sorting Docs | |||
100 |
|
| TanStack Table Filtering Docs | ||
101 |
| TanStack Table Sorting Docs | |||
102 |
| Memoize Components Guide | |||
103 |
| TanStack Table Core Docs | |||
104 |
| TanStack Table Core Docs | |||
105 |
| Material UI Box Props | |||
106 |
| Material UI CircularProgress Props | |||
107 |
| Material UI IconButton Props | |||
108 |
| Material UI IconButton Props | |||
109 |
| Material UI Button Props | |||
110 |
| Material UI TableCell Props | |||
111 |
| Material UI Dialog Props | |||
112 |
| Material UI TextField Props | |||
113 |
| Material UI IconButton Props | |||
114 |
| Material UI IconButton Props | |||
115 |
| Material UI Autocomplete Props | |||
116 |
| Material UI Checkbox Props | |||
117 |
| MUI X DatePicker Props | |||
118 |
| MUI X DateTimePicker Props | |||
119 |
| Material UI Slider Props | |||
120 |
| Material UI TextField Props | |||
121 |
| MUI X TimePicker Props | |||
122 |
| Material UI LinearProgress Props | |||
123 |
| Material UI TablePagination Props | |||
124 |
| Material UI IconButton Props | |||
125 |
| Material UI TextField Props | |||
126 |
| Material UI Checkbox Props | |||
127 |
| Material UI Checkbox Props | |||
128 |
| Material UI Skeleton Props | |||
129 |
| Material UI TableCell Props | |||
130 |
| Material UI TableBody Props | |||
131 |
|
| Material UI TableRow Props | ||
132 |
| Material UI TableContainer Props | |||
133 |
| Material UI TableCell Props | |||
134 |
| Material UI TableFooter Props | |||
135 |
| Material UI TableRow Props | |||
136 |
| Material UI TableCell Props | |||
137 |
| Material UI TableHead Props | |||
138 |
| Material UI TableRow Props | |||
139 |
| Material UI Paper API Docs | |||
140 |
| Material UI TableProps API Docs | |||
141 |
| Material UI Chip Props | |||
142 |
| Material UI Alert Props | |||
143 |
| Material UI Box Props | |||
144 |
| ||||
145 |
| TanStack Table Filter Docs | |||
146 |
| TanStack Table Column Ordering Docs | |||
147 |
| TanStack Table Column Pinning Docs | |||
148 |
| TanStack Table Column Sizing Docs | |||
149 |
| TanStack Table Column Sizing Docs | |||
150 |
| TanStack Table Column Visibility Docs | |||
151 |
| MRT Editing Docs | |||
152 |
| ||||
153 |
| MRT Editing Docs | |||
154 |
| MRT Density Toggle Docs | |||
155 |
| ||||
156 |
| ||||
157 |
| ||||
158 |
| MRT Editing Docs | |||
159 |
| ||||
160 |
| MRT Editing Docs | |||
161 |
| TanStack Table Expanding Docs | |||
162 |
| TanStack Table Filters Docs | |||
163 |
| TanStack Table Filters Docs | |||
164 |
| TanStack Table Grouping Docs | |||
165 |
| ||||
166 |
| ||||
167 |
| MRT Full Screen Toggle Docs | |||
168 |
| TanStack Table Pagination Docs | |||
169 |
| TanStack Table Pinning Docs | |||
170 |
| TanStack Table Row Selection Docs | |||
171 |
| ||||
172 |
| ||||
173 |
| ||||
174 |
| ||||
175 |
| TanStack Table Sorting Docs | |||
176 |
| TanStack Table Pagination Docs | |||
177 |
| TanStack Table Expanding Docs | |||
178 |
| ||||
179 |
|
| |||
180 |
|
| |||
181 |
|
| |||
182 |
|
| |||
183 |
|
| |||
184 |
|
| |||
185 |
| ||||
186 |
| ||||
187 |
| ||||
188 |
| ||||
189 |
| ||||
190 |
| ||||
191 |
| ||||
192 |
| ||||
193 |
| ||||
194 |
| ||||
195 |
| ||||
196 |
| ||||
197 |
| ||||
198 |
| ||||
199 |
| ||||
200 |
| ||||
201 |
| ||||
202 |
| ||||
203 |
|
| |||
204 |
|
| |||
205 |
| ||||
206 |
| ||||
207 |
|
| |||
208 |
| TanStack Table Sorting Docs | |||
209 |
| TanStack Table Sorting Docs | |||
210 |
| Table State Management Guide | |||
Wanna see the source code for this table? Check it out down below!
1import { useEffect, useMemo, useState } from 'react';2import Link from 'next/link';3import {4 MaterialReactTable,5 type MRT_TableOptions,6 type MRT_ColumnDef,7} from 'material-react-table';8import {9 Link as MuiLink,10 Typography,11 useMediaQuery,12 useTheme,13} from '@mui/material';14import { SampleCodeSnippet } from '../mdx/SampleCodeSnippet';15import { type TableOption, tableOptions } from './tableOptions';1617interface Props {18 onlyOptions?: Set<keyof MRT_TableOptions<TableOption>>;19}2021const TableOptionsTable = ({ onlyOptions }: Props) => {22 const theme = useTheme();23 const isDesktop = useMediaQuery('(min-width: 1200px)');2425 const columns = useMemo<MRT_ColumnDef<TableOption>[]>(26 () => [27 {28 enableClickToCopy: true,29 header: 'Prop Name',30 accessorKey: 'tableOption',31 muiCopyButtonProps: ({ cell }) => ({32 className: 'prop',33 id: `${cell.getValue<string>()}-prop`,34 }),35 Cell: ({ renderedCellValue, row }) =>36 row.original?.required ? (37 <strong style={{ color: theme.palette.primary.dark }}>38 {renderedCellValue}*39 </strong>40 ) : (41 renderedCellValue42 ),43 },44 {45 header: 'Type',46 accessorKey: 'type',47 enableGlobalFilter: false,48 Cell: ({ cell }) => (49 <SampleCodeSnippet50 className="language-ts"51 enableCopyButton={false}52 style={{53 backgroundColor: 'transparent',54 fontSize: '0.9rem',55 margin: 0,56 padding: 0,57 minHeight: 'unset',58 }}59 >60 {cell.getValue<string>()}61 </SampleCodeSnippet>62 ),63 },64 {65 header: 'Default Value',66 accessorKey: 'defaultValue',67 enableGlobalFilter: false,68 Cell: ({ cell }) => (69 <SampleCodeSnippet70 className="language-js"71 enableCopyButton={false}72 style={