Table Options (Props)
Many of the options you can pass touseMantineReactTable
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
useMantineReactTable
hook.const table = useMantineReactTable({// all the options that you can pass here});//Note: you can also pass table options directly to the MantineReactTable component instead of the table instance//But this will not be encouraged as it will be deprecated in the futurereturn <MantineReactTable table={table} />;
# | Prop Name | Type | Default Value | More Info Links | |
---|---|---|---|---|---|
1 |
| TanStack Table Grouping Docs | |||
This option allows you to define custom aggregation functions that can be referenced in a column's aggregationFn option by their key | |||||
2 |
| TanStack Table Core Table Docs | |||
Set this option to override any of the autoReset... feature options. | |||||
3 |
| TanStack Table Expanding Docs | |||
Enable this setting to automatically reset the expanded state of the table when grouping state changes. | |||||
4 |
| TanStack Table Pagination Docs | |||
If set to true, pagination will be reset to the first page when page-altering state changes eg. data is updated, filters change, grouping changes, etc. | |||||
5 |
|
| MRT Column Filtering Docs | ||
You can choose between 3 different built-in filter display modes. See column filters below the header, in a pop-up menu, or in your own custom components. | |||||
6 |
| MRT Column Filtering Docs | |||
Specify which filter modes are available for every column. Optionally specify this per column as a column option. | |||||
7 |
|
| MRT Column Resizing Docs | ||
Determines when the columnSizing state is updated. onChange updates the state when the user is dragging the resize handle. onEnd updates the state when the user releases the resize handle. | |||||
8 |
| MRT Column Options API Reference | |||
The array of column defs to use for the table. | |||||
9 |
| ||||
No Description Provided... Yet... | |||||
10 |
| ||||
No Description Provided... Yet... | |||||
11 |
|
| MRT Editing Docs | ||
You can choose between 3 different built-in creating modes. Create a row in a modal, or a row inline, or render your own custom creating UI. | |||||
12 |
| Usage Docs | |||
The data for the table to display. This can be an array of anything, but you will need to set up your column definitions to "access" the data. When the data option changes reference (compared via Object.is), the table will reprocess the data. Any other data processing that relies on the core data model (such as grouping, sorting, filtering, etc) will also be reprocessed. | |||||
13 |
|
| TanStack Table Core Table Docs | ||
Set this option to true to output all debugging information to the console. | |||||
14 |
|
| TanStack Table Core Table Docs | ||
Set this option to true to output column debugging information to the console. | |||||
15 |
|
| TanStack Table Core Table Docs | ||
Set this option to true to output header debugging information to the console. | |||||
16 |
|
| TanStack Table Core Table Docs | ||
Set this option to true to output row debugging information to the console. | |||||
17 |
|
| TanStack Table Core Table Docs | ||
Set this option to true to output table debugging information to the console. | |||||
18 |
| TanStack Table Core Table Docs | |||
Default column options to use for all column defs supplied to the table. This is useful for providing default cell/header/footer renderers, sorting/filtering/grouping options, etc. | |||||
19 |
| MRT Display Columns Docs | |||
Customize and override the column definition options for the built-in display columns. (Select, Expand, Row Actions, etc.) | |||||
20 |
|
| MRT Editing Docs | ||
You can choose between 5 different built-in editing modes. Edit a row in a modal, or a row inline, just 1 cell at a time, always have all cells editable, or create your own custom external editing UI. | |||||
21 |
|
| MRT Customize Toolbars Docs | ||
No Description Provided... Yet... | |||||
22 |
|
| MRT Click to Copy Docs | ||
No Description Provided... Yet... | |||||
23 |
|
| MRT Column Actions Docs | ||
No Description Provided... Yet... | |||||
24 |
|
| MRT Column Ordering DnD Docs | ||
No Description Provided... Yet... | |||||
25 |
|
| MRT Column Filtering Docs | ||
No Description Provided... Yet... | |||||
26 |
|
| MRT Column Filtering Docs | ||
No Description Provided... Yet... | |||||
27 |
| MRT Column Ordering DnD Docs | |||
No Description Provided... Yet... | |||||
28 |
| MRT Column Resizing Docs | |||
No Description Provided... Yet... | |||||
29 |
| MRT Virtualization Docs | |||
No Description Provided... Yet... | |||||
30 |
|
| MRT Density Toggle Docs | ||
No Description Provided... Yet... | |||||
31 |
| MRT Editing Docs | |||
No Description Provided... Yet... | |||||
32 |
|
| MRT Expanding Sub Rows Docs | ||
No Description Provided... Yet... | |||||
33 |
| MRT Expanding Sub Rows Docs | |||
No Description Provided... Yet... | |||||
34 |
| MRT Column Filtering Docs | |||
No Description Provided... Yet... | |||||
35 |
|
| MRT Column Filtering Docs | ||
Enable or disable highlighting text that matches the filter in the table cells. | |||||
36 |
|
| TanStack Filters Docs | ||
Enable or disable both the global and column filters. | |||||
37 |
|
| MRT Full Screen Toggle Docs | ||
Enable or disable the full screen toggle feature. Disabling will also hide the full screen toggle button. | |||||
38 |
|
| MRT Global Filtering Docs | ||
No Description Provided... Yet... | |||||
39 |
|
| MRT Global Filtering Docs | ||
No Description Provided... Yet... | |||||
40 |
|
| MRT Global Filtering Docs | ||
No Description Provided... Yet... | |||||
41 |
| MRT Aggregation and Grouping Docs | |||
No Description Provided... Yet... | |||||
42 |
|
| MRT Column Hiding Docs | ||
No Description Provided... Yet... | |||||
43 |
| TanStack Sorting Docs | |||
No Description Provided... Yet... | |||||
44 |
|
| MRT Row Selection Docs | ||
If true, the user can select multiple rows at once with a checkbox. If false, the user can only select one row at a time with a radio button. | |||||
45 |
| ||||
No Description Provided... Yet... | |||||
46 |
|
| |||
No Description Provided... Yet... | |||||
47 |
| ||||
No Description Provided... Yet... | |||||
48 |
| ||||
No Description Provided... Yet... | |||||
49 |
| ||||
No Description Provided... Yet... | |||||
50 |
| Row Numbers Feature Guide | |||
No Description Provided... Yet... | |||||
51 |
| ||||
No Description Provided... Yet... | |||||
52 |
| ||||
No Description Provided... Yet... | |||||
53 |
| MRT Virtualization Docs | |||
No Description Provided... Yet... | |||||
54 |
|
| |||
No Description Provided... Yet... | |||||
55 |
|
| |||
No Description Provided... Yet... | |||||
56 |
|
| |||
No Description Provided... Yet... | |||||
57 |
| ||||
No Description Provided... Yet... | |||||
58 |
| ||||
No Description Provided... Yet... | |||||
59 |
|
| |||
No Description Provided... Yet... | |||||
60 |
|
| |||
No Description Provided... Yet... | |||||
61 |
|
| |||
No Description Provided... Yet... | |||||
62 |
|
| |||
No Description Provided... Yet... | |||||
63 |
|
| |||
No Description Provided... Yet... | |||||
64 |
| ||||
No Description Provided... Yet... | |||||
65 |
| TanStack Table Filters Docs | |||
This option allows you to define custom filter functions that can be referenced in a column's filterFn option by their key | |||||
66 |
|
| TanStack Filtering Docs | ||
No Description Provided... Yet... | |||||
67 |
| ||||
No Description Provided... Yet... | |||||
68 |
| TanStack Table Core Table Docs | |||
Mantine React Table uses the default core row model function from TanStack Table, but you can override its implementation here. It is called once per table and should return a new function which will calculate and return the row model for the table. | |||||
69 |
| ||||
No Description Provided... Yet... | |||||
70 |
| TanStack Table Filters Docs | |||
A function that computes and returns a min/max tuple derived from column.getFacetedRowModel. Useful for displaying faceted result values. | |||||
71 |
| TanStack Table Filters Docs | |||
Returns the row model with all other column filters applied, excluding its own filter. Useful for displaying faceted result counts. | |||||
72 |
| TanStack Table Filters Docs | |||
A function that computes and returns a Map of unique values and their occurrences derived from column.getFacetedRowModel. Useful for displaying faceted result values. | |||||
73 |
| TanStack Table Filters Docs | |||
Returns the row model with all other column filters applied, excluding its own filter. Useful for displaying faceted result counts. | |||||
74 |
| TanStack Table Grouping Docs | |||
Returns the row model after grouping has taken place, but no further. | |||||
75 |
| TanStack Table Expanding Docs | |||
If provided, allows you to override the default behavior of determining whether a row is currently expanded. | |||||
76 |
| ||||
No Description Provided... Yet... | |||||
77 |
| TanStack Table Expanding Docs | |||
If provided, allows you to override the default behavior of determining whether a row can be expanded. | |||||
78 |
| TanStack Table Core Table Docs | |||
This optional function is used to derive a unique ID for any given row. If not provided the rows index is used (nested rows join together with . using their grandparents' index eg. index.index.index). If you need to identify individual rows that are originating from any server-side operations, it's suggested you use this function to return an ID that makes sense regardless of network IO/ambiguity eg. a userId, taskId, database ID field, etc. | |||||
79 |
| TanStack Table Sorting Docs | |||
This function is used to retrieve the sorted row model. If using server-side sorting, this function is not required. To use client-side sorting, pass the exported getSortedRowModel() from your adapter to your table or implement your own. | |||||
80 |
| TanStack Table Core Table Docs | |||
This optional function is used to access the sub rows for any given row. If you are using nested rows, you will need to use this function to return the sub rows object (or undefined) from the row. | |||||
81 |
| ||||
The filter function to use for global filtering. | |||||
82 |
| ||||
No Description Provided... Yet... | |||||
83 |
|
| TanStack Table Grouping Docs | ||
Grouping columns are automatically reordered by default to the start of the columns list. If you would rather remove them or leave them as-is, set the appropriate mode here. | |||||
84 |
| ||||
No Description Provided... Yet... | |||||
85 |
| Table State Management Guide | |||
Use this option to optionally pass initial state to the table. This state will be used when resetting various table states either automatically by the table (eg. options.autoResetPagination) or via functions like table.resetRowSelection(). Most reset function allow you optionally pass a flag to reset to a blank/default state instead of the initial state. Table state will not be reset when this object changes, which also means that the initial state object does not need to be stable. | |||||
86 |
| TanStack Table Sorting Docs | |||
Pass a custom function that will be used to determine if a multi-sort event should be triggered. It is passed the event from the sort toggle handler and should return true if the event should trigger a multi-sort. | |||||
87 |
|
| TODO | ||
No Description Provided... Yet... | |||||
88 |
| Localization (i18n) Guide | |||
No Description Provided... Yet... | |||||
89 |
| Mantine Toolbar Docs | |||
No Description Provided... Yet... | |||||
90 |
| Mantine ActionIcon Docs | |||
No Description Provided... Yet... | |||||
91 |
| Mantine ActionIcon Docs | |||
No Description Provided... Yet... | |||||
92 |
| Mantine UnstyledButton Docs | |||
No Description Provided... Yet... | |||||
93 |
| Mantine Modal Docs | |||
No Description Provided... Yet... | |||||
94 |
| Mantine Box Docs | |||
No Description Provided... Yet... | |||||
95 |
| Mantine Modal Docs | |||
No Description Provided... Yet... | |||||
96 |
| Mantine Select Docs | |||
No Description Provided... Yet... | |||||
97 |
| Mantine TextInput Docs | |||
No Description Provided... Yet... | |||||
98 |
| Mantine ActionIcon Docs | |||
No Description Provided... Yet... | |||||
99 |
| Mantine ActionIcon Docs | |||
No Description Provided... Yet... | |||||
100 |
| Mantine Autocomplete Docs | |||
No Description Provided... Yet... | |||||
101 |
| Mantine Checkbox Docs | |||
No Description Provided... Yet... | |||||
102 |
| Mantine DateInput Docs | |||
No Description Provided... Yet... | |||||
103 |
| Mantine MultiSelect Docs | |||
No Description Provided... Yet... | |||||
104 |
| Mantine Slider Docs | |||
No Description Provided... Yet... | |||||
105 |
| Mantine Select Docs | |||
No Description Provided... Yet... | |||||
106 |
| Mantine TextInput Docs | |||
No Description Provided... Yet... | |||||
107 |
| Mantine Highlight Docs | |||
No Description Provided... Yet... | |||||
108 |
| Mantine LoadingOverlay Docs | |||
No Description Provided... Yet... | |||||
109 |
| Mantine Pagination Docs | |||
No Description Provided... Yet... | |||||
110 |
| Mantine Paper Docs | |||
No Description Provided... Yet... | |||||
111 |
| Mantine Progress Docs | |||
No Description Provided... Yet... | |||||
112 |
| Mantine ActionIcon Docs | |||
No Description Provided... Yet... | |||||
113 |
| Mantine TextInput Docs | |||
No Description Provided... Yet... | |||||
114 |
| Mantine Checkbox Docs | |||
No Description Provided... Yet... | |||||
115 |
| Mantine Checkbox Docs | |||
No Description Provided... Yet... | |||||
116 |
| Mantine Skeleton Docs | |||
No Description Provided... Yet... | |||||
117 |
| Mantine Box Docs | |||
No Description Provided... Yet... | |||||
118 |
| Mantine Box Docs | |||
No Description Provided... Yet... | |||||
119 |
| Mantine Box Docs | |||
No Description Provided... Yet... | |||||
120 |
| Mantine Box Docs | |||
No Description Provided... Yet... | |||||
121 |
| Mantine Box Docs | |||
No Description Provided... Yet... | |||||
122 |
| Mantine Box Docs | |||
No Description Provided... Yet... | |||||
123 |
| Mantine Box Docs | |||
No Description Provided... Yet... | |||||
124 |
| Mantine Box Docs | |||
No Description Provided... Yet... | |||||
125 |
| Mantine TableHead Docs | |||
No Description Provided... Yet... | |||||
126 |
| Mantine Box Docs | |||
No Description Provided... Yet... | |||||
127 |
| Mantine Table Docs | |||
No Description Provided... Yet... | |||||
128 |
| Mantine Chip Docs | |||
No Description Provided... Yet... | |||||
129 |
| Mantine Alert Docs | |||
No Description Provided... Yet... | |||||
130 |
| Mantine Toolbar Docs | |||
No Description Provided... Yet... | |||||
131 |
| TanStack Table Expanding Docs | |||
Enables manual row expansion. If this is set to true, getExpandedRowModel will not be used to expand rows and you would be expected to perform the expansion in your own data model. This is useful if you are doing server-side expansion. | |||||
132 |
| TanStack Table Filters Docs | |||
Disables the getFilteredRowModel from being used to filter data. This may be useful if your table needs to dynamically support both client-side and server-side filtering. | |||||
133 |
| TanStack Table Grouping Docs | |||
Enables manual grouping. If this option is set to true, the table will not automatically group rows using getGroupedRowModel() and instead will expect you to manually group the rows before passing them to the table. This is useful if you are doing server-side grouping and aggregation. | |||||
134 |
| TanStack Table Pagination Docs | |||
Enables manual pagination. If this option is set to true, the table will not automatically paginate rows using getPaginationRowModel() and instead will expect you to manually paginate the rows before passing them to the table. This is useful if you are doing server-side pagination and aggregation. | |||||
135 |
| TanStack Table Sorting Docs | |||
Enables manual sorting for the table. If this is true, you will be expected to sort your data before it is passed to the table. This is useful if you are doing server-side sorting. | |||||
136 |
|
| TanStack Table Filtering Docs | ||
Set a maximum number leaf row depth that will be filtered. Preserve child rows of filtered rows by setting this to "0" | |||||
137 |
| TanStack Table Sorting Docs | |||
Set a maximum number of columns that can be multi-sorted. | |||||
138 |
| Memoize Components Guide | |||
No Description Provided... Yet... | |||||
139 |
| TanStack Table Core Docs | |||
This option is used to optionally implement the merging of table options. Some framework like solid-js use proxies to track reactivity and usage, so merging reactive objects needs to be handled carefully. This option inverts control of this process to the adapter. | |||||
140 |
| TanStack Table Core Docs | |||
You can pass any object to options.meta and access it anywhere the table is available via table.options.meta This type is global to all tables. | |||||
141 |
| ||||
No Description Provided... Yet... | |||||
142 |
| TanStack Table Filter Docs | |||
If provided, this function will be called with an updaterFn when state.columnFilters changes. This overrides the default internal state management, so you will need to persist the state change either fully or partially outside of the table. | |||||
143 |
| TanStack Table Column Ordering Docs | |||
If provided, this function will be called with an updaterFn when state.columnOrder changes. This overrides the default internal state management, so you will need to persist the state change either fully or partially outside of the table. | |||||
144 |
| TanStack Table Column Pinning Docs | |||
If provided, this function will be called with an updaterFn when state.columnPinning changes. This overrides the default internal state management, so you will need to persist the state change either fully or partially outside of the table. | |||||
145 |
| TanStack Table Column Sizing Docs | |||
This optional function will be called when the columnSizing state changes. If you provide this function, you will be responsible for maintaining its state yourself. You can pass this state back to the table via the state.columnSizing table option. | |||||
146 |
| TanStack Table Column Sizing Docs | |||
This optional function will be called when the columnSizingInfo state changes. If you provide this function, you will be responsible for maintaining its state yourself. You can pass this state back to the table via the state.columnSizingInfo table option. | |||||
147 |
| TanStack Table Column Visibility Docs | |||
If provided, this function will be called with an updaterFn when state.columnVisibility changes. This overrides the default internal state management, so you will need to persist the state change either fully or partially outside of the table. | |||||
148 |
| MRT Editing Docs | |||
No Description Provided... Yet... | |||||
149 |
| ||||
No Description Provided... Yet... | |||||
150 |
| MRT Editing Docs | |||
No Description Provided... Yet... | |||||
151 |
| MRT Density Toggle Docs | |||
No Description Provided... Yet... | |||||
152 |
| ||||
No Description Provided... Yet... | |||||
153 |
| ||||
No Description Provided... Yet... | |||||
154 |
| ||||
No Description Provided... Yet... | |||||
155 |
| MRT Editing Docs | |||
No Description Provided... Yet... | |||||
156 |
| ||||
No Description Provided... Yet... | |||||
157 |
| MRT Editing Docs | |||
No Description Provided... Yet... | |||||
158 |
| TanStack Table Expanding Docs | |||
This function is called when the expanded table state changes. If a function is provided, you will be responsible for managing this state on your own. To pass the managed state back to the table, use the tableOptions.state.expanded option. | |||||
159 |
| TanStack Table Filters Docs | |||
If provided, this function will be called with an updaterFn when state.globalFilter changes. This overrides the default internal state management, so you will need to persist the state change either fully or partially outside of the table. | |||||
160 |
| TanStack Table Filters Docs | |||
If provided, this function will be called with an updaterFn when state.globalFilter changes. This overrides the default internal state management, so you will need to persist the state change either fully or partially outside of the table. | |||||
161 |
| TanStack Table Grouping Docs | |||
If this function is provided, it will be called when the grouping state changes and you will be expected to manage the state yourself. You can pass the managed state back to the table via the tableOptions.state.grouping option. | |||||
162 |
| ||||
No Description Provided... Yet... | |||||
163 |
| ||||
No Description Provided... Yet... | |||||
164 |
| MRT Full Screen Toggle Docs | |||
No Description Provided... Yet... | |||||
165 |
| TanStack Table Pagination Docs | |||
If this function is provided, it will be called when the pagination state changes and you will be expected to manage the state yourself. You can pass the managed state back to the table via the tableOptions.state.pagination option. | |||||
166 |
| TanStack Table Row Selection Docs | |||
If provided, this function will be called with an updaterFn when state.rowSelection changes. This overrides the default internal state management, so you will need to persist the state change either fully or partially outside of the table. | |||||
167 |
| ||||
No Description Provided... Yet... | |||||
168 |
| ||||
No Description Provided... Yet... | |||||
169 |
| ||||
No Description Provided... Yet... | |||||
170 |
| ||||
No Description Provided... Yet... | |||||
171 |
| TanStack Table Sorting Docs | |||
If provided, this function will be called with an updaterFn when state.sorting changes. This overrides the default internal state management, so you will need to persist the state change either fully or partially outside of the table. | |||||
172 |
| TanStack Table Pagination Docs | |||
When manually controlling pagination, you should supply a total pageCount value to the table if you know it. If you do not know how many pages there are, you can set this to -1. | |||||
173 |
| TanStack Table Expanding Docs | |||
If true expanded rows will be paginated along with the rest of the table (which means expanded rows may span multiple pages). If false expanded rows will not be considered for pagination (which means expanded rows will always render on their parents page. This also means more rows will be rendered than the set page size) | |||||
174 |
|
| MRT Editing Docs | ||
You can choose between 3 different built-in pagination display modes. Use the default pagination UI, mantine's pagination component, or a custom pagination component. | |||||
175 |
| ||||
No Description Provided... Yet... | |||||
176 |
| ||||
No Description Provided... Yet... | |||||
177 |
| ||||
No Description Provided... Yet... | |||||
178 |
| ||||
No Description Provided... Yet... | |||||
179 |
| ||||
No Description Provided... Yet... | |||||
180 |
| ||||
No Description Provided... Yet... | |||||
181 |
| ||||
No Description Provided... Yet... | |||||
182 |
| ||||
No Description Provided... Yet... | |||||
183 |
| ||||
No Description Provided... Yet... | |||||
184 |
| ||||
No Description Provided... Yet... | |||||
185 |
| ||||
No Description Provided... Yet... | |||||
186 |
| ||||
No Description Provided... Yet... | |||||
187 |
| ||||
No Description Provided... Yet... | |||||
188 |
| ||||
No Description Provided... Yet... | |||||
189 |
| ||||
No Description Provided... Yet... | |||||
190 |
| ||||
No Description Provided... Yet... | |||||
191 |
| ||||
No Description Provided... Yet... | |||||
192 |
| ||||
No Description Provided... Yet... | |||||
193 |
| ||||
No Description Provided... Yet... | |||||
194 |
| ||||
No Description Provided... Yet... | |||||
195 |
| ||||
No Description Provided... Yet... | |||||
196 |
| ||||
No Description Provided... Yet... | |||||
197 |
|
| |||
No Description Provided... Yet... | |||||
198 |
| ||||
No Description Provided... Yet... | |||||
199 |
| ||||
No Description Provided... Yet... | |||||
200 |
|
| |||
No Description Provided... Yet... | |||||
201 |
|
| MRT Editing Docs | ||
You can choose between 3 different built-in select display modes. Use the default checkboxes, radio buttons, or switches. | |||||
202 |
| TanStack Table Sorting Docs | |||
Set to true for sorting toggles on this column to start in the descending direction. | |||||
203 |
| TanStack Table Sorting Docs | |||
This option allows you to define custom sorting functions that can be referenced in a column's sortingFn option by their key. Example: | |||||
204 |
| Table State Management Guide | |||
No Description Provided... Yet... |
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 {4MantineReactTable,5type MRT_TableOptions,6type MRT_ColumnDef,7} from 'mantine-react-table';8import { Anchor, Text } from '@mantine/core';9import { useMediaQuery } from '@mantine/hooks';10import { SampleCodeSnippet } from '../mdx/SampleCodeSnippet';11import { type TableOption, tableOptions } from './tableOptions';12import { getPrimaryColor } from 'mantine-react-table/src/column.utils';1314interface Props {15onlyOptions?: Set<keyof MRT_TableOptions<TableOption>>;16}1718const TableOptionsTable = ({ onlyOptions }: Props) => {19const isDesktop = useMediaQuery('(min-width: 1200px)');2021const columns = useMemo(22() =>23[24{25enableClickToCopy: true,26header: 'Prop Name',27accessorKey: 'tableOption',28mantineCopyButtonProps: ({ cell }) => ({29className: 'prop',30id: `${cell.getValue<string>()}-prop`,31}),32Cell: ({ renderedCellValue, row }) =>33row.original?.required ? (34<Text35component="strong"36sx={(theme) => ({37color: getPrimaryColor(theme),38})}39>40{renderedCellValue}*41</Text>42) : (43renderedCellValue44),45},46{47header: 'Type',48accessorKey: 'type',49enableGlobalFilter: false,50Cell: ({ cell }) => (51<SampleCodeSnippet language="typescript" noCopy>52{cell.getValue<string>()}53</SampleCodeSnippet>54),55},56{57header: 'Required',58accessorKey: 'required',59enableGlobalFilter: false,60},61{62header: 'Default Value',63accessorKey: 'defaultValue',64enableGlobalFilter: false,65Cell: ({ cell }) => (66<SampleCodeSnippet language="typescript" noCopy>67{cell.getValue<string>()}68</SampleCodeSnippet>69),70},71{72header: 'Description',73accessorKey: 'description',74enableGlobalFilter: false,75},76{77header: 'More Info Links',78accessorKey: 'link',79disableFilters: true,80enableGlobalFilter: false,81Cell: ({ cell, row }) => (82<Link href={cell.getValue() as string} passHref legacyBehavior>83<Anchor84color={85row.original.source === 'MRT'86? 'dimmed'87: row.original.source === 'Mantine'88? 'teal'89: row.original.source === 'TanStack Table'90? 'blue'91: undefined92}93target={94(cell.getValue() as string).startsWith('http')95? '_blank'96: undefined97}98rel="noopener"99>100{row.original?.linkText}101</Anchor>102</Link>103),104},105] as MRT_ColumnDef<TableOption>[],106[],107);108109const [columnPinning, setColumnPinning] = useState({});110111useEffect(() => {112if (typeof window !== 'undefined') {113if (isDesktop) {114setColumnPinning({115left: ['mrt-row-expand', 'mrt-row-numbers', 'tableOption'],116right: ['link'],117});118} else {119setColumnPinning({});120}121}122}, [isDesktop]);123124const data = useMemo(() => {125if (onlyOptions) {126return tableOptions.filter(({ tableOption }) =>127onlyOptions.has(tableOption),128);129}130return tableOptions;131}, [onlyOptions]);132133return (134<MantineReactTable135columns={columns}136data={data}137displayColumnDefOptions={{138'mrt-row-numbers': {139size: 10,140},141'mrt-row-expand': {142size: 10,143},144}}145enableColumnActions={!onlyOptions}146enableColumnFilterModes147enablePagination={false}148enablePinning149enableRowNumbers150enableBottomToolbar={false}151enableTopToolbar={!onlyOptions}152initialState={{153columnVisibility: { required: false, description: false },154density: 'xs',155showGlobalFilter: true,156sorting: [{ id: 'tableOption', desc: false }],157}}158mantineSearchTextInputProps={{159placeholder: 'Search All Props',160sx: { minWidth: '18rem' },161variant: 'filled',162}}163mantinePaperProps={{164sx: { marginBottom: '24px' },165id: onlyOptions ? 'relevant-props-table' : 'props-table',166}}167positionGlobalFilter="left"168renderDetailPanel={({ row }) => (169<Text color={row.original.description ? 'teal' : 'gray'}>170{row.original.description || 'No Description Provided... Yet...'}171</Text>172)}173rowNumberMode="static"174onColumnPinningChange={setColumnPinning}175state={{ columnPinning }}176/>177);178};179180export default TableOptionsTable;