material-react-table 1.5.12 → 1.6.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 +2 -1
- package/dist/cjs/index.js +67 -12
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/MaterialReactTable.d.ts +68 -66
- package/dist/cjs/types/body/MRT_TableBodyCellValue.d.ts +1 -1
- package/dist/cjs/types/column.utils.d.ts +18 -4
- package/dist/cjs/types/index.d.ts +2 -1
- package/dist/cjs/types/table/MRT_TableRoot.d.ts +48 -47
- package/dist/esm/material-react-table.esm.js +66 -13
- package/dist/esm/material-react-table.esm.js.map +1 -1
- package/dist/esm/types/MaterialReactTable.d.ts +68 -66
- package/dist/esm/types/body/MRT_TableBodyCellValue.d.ts +1 -1
- package/dist/esm/types/column.utils.d.ts +18 -4
- package/dist/esm/types/index.d.ts +2 -1
- package/dist/esm/types/table/MRT_TableRoot.d.ts +48 -47
- package/dist/index.d.ts +78 -69
- package/package.json +3 -2
- package/src/MaterialReactTable.tsx +72 -256
- package/src/body/MRT_TableBodyCell.tsx +7 -1
- package/src/body/MRT_TableBodyCellValue.tsx +93 -23
- package/src/buttons/MRT_ToggleGlobalFilterButton.tsx +1 -0
- package/src/column.utils.ts +4 -3
- package/src/index.tsx +2 -0
- package/src/toolbar/MRT_ToolbarDropZone.tsx +6 -4
- package/src/toolbar/MRT_TopToolbar.tsx +2 -1
@@ -24,6 +24,7 @@ export declare const MRT_TableRoot: <TData extends Record<string, any> = {}>(pro
|
|
24
24
|
enableDensityToggle?: boolean | undefined;
|
25
25
|
enableEditing?: boolean | undefined;
|
26
26
|
enableExpandAll?: boolean | undefined;
|
27
|
+
enableFilterMatchHighlighting?: boolean | undefined;
|
27
28
|
enableFullScreenToggle?: boolean | undefined;
|
28
29
|
enableGlobalFilterModes?: boolean | undefined;
|
29
30
|
enableGlobalFilterRankedResults?: boolean | undefined;
|
@@ -50,139 +51,139 @@ export declare const MRT_TableRoot: <TData extends Record<string, any> = {}>(pro
|
|
50
51
|
layoutMode?: "grid" | "semantic" | undefined;
|
51
52
|
localization?: Partial<MRT_Localization> | undefined;
|
52
53
|
memoMode?: "rows" | "cells" | "table-body" | undefined;
|
53
|
-
muiBottomToolbarProps?: import("@mui/material").ToolbarProps<"div", {}> | ((
|
54
|
+
muiBottomToolbarProps?: import("@mui/material").ToolbarProps<"div", {}> | ((props: {
|
54
55
|
table: MRT_TableInstance<TData>;
|
55
56
|
}) => import("@mui/material").ToolbarProps<"div", {}>) | undefined;
|
56
|
-
muiExpandAllButtonProps?: import("@mui/material").IconButtonProps<"button", {}> | ((
|
57
|
+
muiExpandAllButtonProps?: import("@mui/material").IconButtonProps<"button", {}> | ((props: {
|
57
58
|
table: MRT_TableInstance<TData>;
|
58
59
|
}) => import("@mui/material").IconButtonProps<"button", {}>) | undefined;
|
59
|
-
muiExpandButtonProps?: import("@mui/material").IconButtonProps<"button", {}> | ((
|
60
|
+
muiExpandButtonProps?: import("@mui/material").IconButtonProps<"button", {}> | ((props: {
|
60
61
|
table: MRT_TableInstance<TData>;
|
61
62
|
row: MRT_Row<TData>;
|
62
63
|
}) => import("@mui/material").IconButtonProps<"button", {}>) | undefined;
|
63
|
-
muiLinearProgressProps?: import("@mui/material").LinearProgressProps | ((
|
64
|
+
muiLinearProgressProps?: import("@mui/material").LinearProgressProps | ((props: {
|
64
65
|
isTopToolbar: boolean;
|
65
66
|
table: MRT_TableInstance<TData>;
|
66
67
|
}) => import("@mui/material").LinearProgressProps) | undefined;
|
67
|
-
muiSearchTextFieldProps?: import("@mui/material").TextFieldProps | ((
|
68
|
+
muiSearchTextFieldProps?: import("@mui/material").TextFieldProps | ((props: {
|
68
69
|
table: MRT_TableInstance<TData>;
|
69
70
|
}) => import("@mui/material").TextFieldProps) | undefined;
|
70
|
-
muiSelectAllCheckboxProps?: import("@mui/material").CheckboxProps | ((
|
71
|
+
muiSelectAllCheckboxProps?: import("@mui/material").CheckboxProps | ((props: {
|
71
72
|
table: MRT_TableInstance<TData>;
|
72
73
|
}) => import("@mui/material").CheckboxProps) | undefined;
|
73
|
-
muiSelectCheckboxProps?: import("@mui/material").CheckboxProps | import("@mui/material").RadioProps | ((
|
74
|
+
muiSelectCheckboxProps?: import("@mui/material").CheckboxProps | import("@mui/material").RadioProps | ((props: {
|
74
75
|
table: MRT_TableInstance<TData>;
|
75
76
|
row: MRT_Row<TData>;
|
76
77
|
}) => import("@mui/material").CheckboxProps | import("@mui/material").RadioProps) | undefined;
|
77
|
-
muiTableBodyCellCopyButtonProps?: import("@mui/material").ButtonProps<"button", {}> | ((
|
78
|
+
muiTableBodyCellCopyButtonProps?: import("@mui/material").ButtonProps<"button", {}> | ((props: {
|
78
79
|
cell: MRT_Cell<TData>;
|
79
80
|
column: MRT_Column<TData>;
|
80
81
|
row: MRT_Row<TData>;
|
81
82
|
table: MRT_TableInstance<TData>;
|
82
83
|
}) => import("@mui/material").ButtonProps<"button", {}>) | undefined;
|
83
|
-
muiTableBodyCellEditTextFieldProps?: import("@mui/material").TextFieldProps | ((
|
84
|
+
muiTableBodyCellEditTextFieldProps?: import("@mui/material").TextFieldProps | ((props: {
|
84
85
|
cell: MRT_Cell<TData>;
|
85
86
|
column: MRT_Column<TData>;
|
86
87
|
row: MRT_Row<TData>;
|
87
88
|
table: MRT_TableInstance<TData>;
|
88
89
|
}) => import("@mui/material").TextFieldProps) | undefined;
|
89
|
-
muiTableBodyCellProps?: import("@mui/material").TableCellProps | ((
|
90
|
+
muiTableBodyCellProps?: import("@mui/material").TableCellProps | ((props: {
|
90
91
|
cell: MRT_Cell<TData>;
|
91
92
|
column: MRT_Column<TData>;
|
92
93
|
row: MRT_Row<TData>;
|
93
94
|
table: MRT_TableInstance<TData>;
|
94
95
|
}) => import("@mui/material").TableCellProps) | undefined;
|
95
|
-
muiTableBodyCellSkeletonProps?: import("@mui/material").SkeletonProps<"span", {}> | ((
|
96
|
+
muiTableBodyCellSkeletonProps?: import("@mui/material").SkeletonProps<"span", {}> | ((props: {
|
96
97
|
cell: MRT_Cell<TData>;
|
97
98
|
column: MRT_Column<TData>;
|
98
99
|
row: MRT_Row<TData>;
|
99
100
|
table: MRT_TableInstance<TData>;
|
100
101
|
}) => import("@mui/material").SkeletonProps<"span", {}>) | undefined;
|
101
|
-
muiTableBodyProps?: import("@mui/material").TableBodyProps<"tbody", {}> | ((
|
102
|
+
muiTableBodyProps?: import("@mui/material").TableBodyProps<"tbody", {}> | ((props: {
|
102
103
|
table: MRT_TableInstance<TData>;
|
103
104
|
}) => import("@mui/material").TableBodyProps<"tbody", {}>) | undefined;
|
104
|
-
muiTableBodyRowDragHandleProps?: import("@mui/material").IconButtonProps<"button", {}> | ((
|
105
|
+
muiTableBodyRowDragHandleProps?: import("@mui/material").IconButtonProps<"button", {}> | ((props: {
|
105
106
|
table: MRT_TableInstance<TData>;
|
106
107
|
row: MRT_Row<TData>;
|
107
108
|
}) => import("@mui/material").IconButtonProps<"button", {}>) | undefined;
|
108
|
-
muiTableBodyRowProps?: import("@mui/material").TableRowProps<"tr", {}> | ((
|
109
|
+
muiTableBodyRowProps?: import("@mui/material").TableRowProps<"tr", {}> | ((props: {
|
109
110
|
isDetailPanel?: boolean | undefined;
|
110
111
|
row: MRT_Row<TData>;
|
111
112
|
table: MRT_TableInstance<TData>;
|
112
113
|
}) => import("@mui/material").TableRowProps<"tr", {}>) | undefined;
|
113
|
-
muiTableContainerProps?: import("@mui/material").TableContainerProps<"div", {}> | ((
|
114
|
+
muiTableContainerProps?: import("@mui/material").TableContainerProps<"div", {}> | ((props: {
|
114
115
|
table: MRT_TableInstance<TData>;
|
115
116
|
}) => import("@mui/material").TableContainerProps<"div", {}>) | undefined;
|
116
|
-
muiTableDetailPanelProps?: import("@mui/material").TableCellProps | ((
|
117
|
+
muiTableDetailPanelProps?: import("@mui/material").TableCellProps | ((props: {
|
117
118
|
table: MRT_TableInstance<TData>;
|
118
119
|
row: MRT_Row<TData>;
|
119
120
|
}) => import("@mui/material").TableCellProps) | undefined;
|
120
|
-
muiTableFooterCellProps?: import("@mui/material").TableCellProps | ((
|
121
|
+
muiTableFooterCellProps?: import("@mui/material").TableCellProps | ((props: {
|
121
122
|
table: MRT_TableInstance<TData>;
|
122
123
|
column: MRT_Column<TData>;
|
123
124
|
}) => import("@mui/material").TableCellProps) | undefined;
|
124
|
-
muiTableFooterProps?: import("@mui/material").TableFooterProps<"tfoot", {}> | ((
|
125
|
+
muiTableFooterProps?: import("@mui/material").TableFooterProps<"tfoot", {}> | ((props: {
|
125
126
|
table: MRT_TableInstance<TData>;
|
126
127
|
}) => import("@mui/material").TableFooterProps<"tfoot", {}>) | undefined;
|
127
|
-
muiTableFooterRowProps?: import("@mui/material").TableRowProps<"tr", {}> | ((
|
128
|
+
muiTableFooterRowProps?: import("@mui/material").TableRowProps<"tr", {}> | ((props: {
|
128
129
|
table: MRT_TableInstance<TData>;
|
129
130
|
footerGroup: import("..").MRT_HeaderGroup<TData>;
|
130
131
|
}) => import("@mui/material").TableRowProps<"tr", {}>) | undefined;
|
131
|
-
muiTableHeadCellColumnActionsButtonProps?: import("@mui/material").IconButtonProps<"button", {}> | ((
|
132
|
+
muiTableHeadCellColumnActionsButtonProps?: import("@mui/material").IconButtonProps<"button", {}> | ((props: {
|
132
133
|
table: MRT_TableInstance<TData>;
|
133
134
|
column: MRT_Column<TData>;
|
134
135
|
}) => import("@mui/material").IconButtonProps<"button", {}>) | undefined;
|
135
|
-
muiTableHeadCellDragHandleProps?: import("@mui/material").IconButtonProps<"button", {}> | ((
|
136
|
+
muiTableHeadCellDragHandleProps?: import("@mui/material").IconButtonProps<"button", {}> | ((props: {
|
136
137
|
table: MRT_TableInstance<TData>;
|
137
138
|
column: MRT_Column<TData>;
|
138
139
|
}) => import("@mui/material").IconButtonProps<"button", {}>) | undefined;
|
139
|
-
muiTableHeadCellFilterCheckboxProps?: import("@mui/material").CheckboxProps | ((
|
140
|
+
muiTableHeadCellFilterCheckboxProps?: import("@mui/material").CheckboxProps | ((props: {
|
140
141
|
column: MRT_Column<TData>;
|
141
142
|
table: MRT_TableInstance<TData>;
|
142
143
|
}) => import("@mui/material").CheckboxProps) | undefined;
|
143
|
-
muiTableHeadCellFilterTextFieldProps?: import("@mui/material").TextFieldProps | ((
|
144
|
+
muiTableHeadCellFilterTextFieldProps?: import("@mui/material").TextFieldProps | ((props: {
|
144
145
|
table: MRT_TableInstance<TData>;
|
145
146
|
column: MRT_Column<TData>;
|
146
147
|
rangeFilterIndex?: number | undefined;
|
147
148
|
}) => import("@mui/material").TextFieldProps) | undefined;
|
148
|
-
muiTableHeadCellProps?: import("@mui/material").TableCellProps | ((
|
149
|
+
muiTableHeadCellProps?: import("@mui/material").TableCellProps | ((props: {
|
149
150
|
table: MRT_TableInstance<TData>;
|
150
151
|
column: MRT_Column<TData>;
|
151
152
|
}) => import("@mui/material").TableCellProps) | undefined;
|
152
|
-
muiTableHeadProps?: import("@mui/material").TableHeadProps<"thead", {}> | ((
|
153
|
+
muiTableHeadProps?: import("@mui/material").TableHeadProps<"thead", {}> | ((props: {
|
153
154
|
table: MRT_TableInstance<TData>;
|
154
155
|
}) => import("@mui/material").TableHeadProps<"thead", {}>) | undefined;
|
155
|
-
muiTableHeadRowProps?: import("@mui/material").TableRowProps<"tr", {}> | ((
|
156
|
+
muiTableHeadRowProps?: import("@mui/material").TableRowProps<"tr", {}> | ((props: {
|
156
157
|
table: MRT_TableInstance<TData>;
|
157
158
|
headerGroup: import("..").MRT_HeaderGroup<TData>;
|
158
159
|
}) => import("@mui/material").TableRowProps<"tr", {}>) | undefined;
|
159
|
-
muiTablePaginationProps?: Partial<import("@mui/material").TablePaginationProps<React.JSXElementConstructor<import("@mui/material").TablePaginationBaseProps>, {}>> | ((
|
160
|
+
muiTablePaginationProps?: Partial<import("@mui/material").TablePaginationProps<React.JSXElementConstructor<import("@mui/material").TablePaginationBaseProps>, {}>> | ((props: {
|
160
161
|
table: MRT_TableInstance<TData>;
|
161
162
|
}) => Partial<import("@mui/material").TablePaginationProps<React.JSXElementConstructor<import("@mui/material").TablePaginationBaseProps>, {}>>) | undefined;
|
162
|
-
muiTablePaperProps?: import("@mui/material").PaperProps<"div", {}> | ((
|
163
|
+
muiTablePaperProps?: import("@mui/material").PaperProps<"div", {}> | ((props: {
|
163
164
|
table: MRT_TableInstance<TData>;
|
164
165
|
}) => import("@mui/material").PaperProps<"div", {}>) | undefined;
|
165
|
-
muiTableProps?: import("@mui/material").TableProps<"table", {}> | ((
|
166
|
+
muiTableProps?: import("@mui/material").TableProps<"table", {}> | ((props: {
|
166
167
|
table: MRT_TableInstance<TData>;
|
167
168
|
}) => import("@mui/material").TableProps<"table", {}>) | undefined;
|
168
|
-
muiToolbarAlertBannerChipProps?: import("@mui/material").ChipProps<"div", {}> | ((
|
169
|
+
muiToolbarAlertBannerChipProps?: import("@mui/material").ChipProps<"div", {}> | ((props: {
|
169
170
|
table: MRT_TableInstance<TData>;
|
170
171
|
}) => import("@mui/material").ChipProps<"div", {}>) | undefined;
|
171
|
-
muiToolbarAlertBannerProps?: import("@mui/material").AlertProps | ((
|
172
|
+
muiToolbarAlertBannerProps?: import("@mui/material").AlertProps | ((props: {
|
172
173
|
table: MRT_TableInstance<TData>;
|
173
174
|
}) => import("@mui/material").AlertProps) | undefined;
|
174
|
-
muiTopToolbarProps?: import("@mui/material").ToolbarProps<"div", {}> | ((
|
175
|
+
muiTopToolbarProps?: import("@mui/material").ToolbarProps<"div", {}> | ((props: {
|
175
176
|
table: MRT_TableInstance<TData>;
|
176
177
|
}) => import("@mui/material").ToolbarProps<"div", {}>) | undefined;
|
177
178
|
onDensityChange?: import("@tanstack/react-table").OnChangeFn<import("..").DensityState> | undefined;
|
178
179
|
onDraggingColumnChange?: import("@tanstack/react-table").OnChangeFn<MRT_Column<TData> | null> | undefined;
|
179
180
|
onDraggingRowChange?: import("@tanstack/react-table").OnChangeFn<MRT_Row<TData> | null> | undefined;
|
180
181
|
onEditingCellChange?: import("@tanstack/react-table").OnChangeFn<MRT_Cell<TData> | null> | undefined;
|
181
|
-
onEditingRowCancel?: ((
|
182
|
+
onEditingRowCancel?: ((props: {
|
182
183
|
row: MRT_Row<TData>;
|
183
184
|
table: MRT_TableInstance<TData>;
|
184
185
|
}) => void) | undefined;
|
185
|
-
onEditingRowSave?: ((
|
186
|
+
onEditingRowSave?: ((props: {
|
186
187
|
exitEditingMode: () => void;
|
187
188
|
row: MRT_Row<TData>;
|
188
189
|
table: MRT_TableInstance<TData>;
|
@@ -206,49 +207,49 @@ export declare const MRT_TableRoot: <TData extends Record<string, any> = {}>(pro
|
|
206
207
|
positionPagination?: "bottom" | "top" | "none" | "both" | undefined;
|
207
208
|
positionToolbarAlertBanner?: "bottom" | "top" | "none" | undefined;
|
208
209
|
positionToolbarDropZone?: "bottom" | "top" | "none" | "both" | undefined;
|
209
|
-
renderBottomToolbar?: React.ReactNode | ((
|
210
|
+
renderBottomToolbar?: React.ReactNode | ((props: {
|
210
211
|
table: MRT_TableInstance<TData>;
|
211
212
|
}) => React.ReactNode);
|
212
|
-
renderBottomToolbarCustomActions?: ((
|
213
|
+
renderBottomToolbarCustomActions?: ((props: {
|
213
214
|
table: MRT_TableInstance<TData>;
|
214
215
|
}) => React.ReactNode) | undefined;
|
215
|
-
renderColumnActionsMenuItems?: ((
|
216
|
+
renderColumnActionsMenuItems?: ((props: {
|
216
217
|
column: MRT_Column<TData>;
|
217
218
|
closeMenu: () => void;
|
218
219
|
table: MRT_TableInstance<TData>;
|
219
220
|
}) => React.ReactNode[]) | undefined;
|
220
|
-
renderColumnFilterModeMenuItems?: ((
|
221
|
+
renderColumnFilterModeMenuItems?: ((props: {
|
221
222
|
column: MRT_Column<TData>;
|
222
223
|
internalFilterOptions: import("..").MRT_InternalFilterOption[];
|
223
224
|
onSelectFilterMode: (filterMode: MRT_FilterOption) => void;
|
224
225
|
table: MRT_TableInstance<TData>;
|
225
226
|
}) => React.ReactNode[]) | undefined;
|
226
|
-
renderDetailPanel?: ((
|
227
|
+
renderDetailPanel?: ((props: {
|
227
228
|
row: MRT_Row<TData>;
|
228
229
|
table: MRT_TableInstance<TData>;
|
229
230
|
}) => React.ReactNode) | undefined;
|
230
|
-
renderGlobalFilterModeMenuItems?: ((
|
231
|
+
renderGlobalFilterModeMenuItems?: ((props: {
|
231
232
|
internalFilterOptions: import("..").MRT_InternalFilterOption[];
|
232
233
|
onSelectFilterMode: (filterMode: MRT_FilterOption) => void;
|
233
234
|
table: MRT_TableInstance<TData>;
|
234
235
|
}) => React.ReactNode[]) | undefined;
|
235
|
-
renderRowActionMenuItems?: ((
|
236
|
+
renderRowActionMenuItems?: ((props: {
|
236
237
|
closeMenu: () => void;
|
237
238
|
row: MRT_Row<TData>;
|
238
239
|
table: MRT_TableInstance<TData>;
|
239
240
|
}) => React.ReactNode[]) | undefined;
|
240
|
-
renderRowActions?: ((
|
241
|
+
renderRowActions?: ((props: {
|
241
242
|
cell: MRT_Cell<TData>;
|
242
243
|
row: MRT_Row<TData>;
|
243
244
|
table: MRT_TableInstance<TData>;
|
244
245
|
}) => React.ReactNode) | undefined;
|
245
|
-
renderToolbarInternalActions?: ((
|
246
|
+
renderToolbarInternalActions?: ((props: {
|
246
247
|
table: MRT_TableInstance<TData>;
|
247
248
|
}) => React.ReactNode) | undefined;
|
248
|
-
renderTopToolbar?: React.ReactNode | ((
|
249
|
+
renderTopToolbar?: React.ReactNode | ((props: {
|
249
250
|
table: MRT_TableInstance<TData>;
|
250
251
|
}) => React.ReactNode);
|
251
|
-
renderTopToolbarCustomActions?: ((
|
252
|
+
renderTopToolbarCustomActions?: ((props: {
|
252
253
|
table: MRT_TableInstance<TData>;
|
253
254
|
}) => React.ReactNode) | undefined;
|
254
255
|
rowCount?: number | undefined;
|
@@ -256,11 +257,11 @@ export declare const MRT_TableRoot: <TData extends Record<string, any> = {}>(pro
|
|
256
257
|
selectAllMode?: "all" | "page" | undefined;
|
257
258
|
state?: Partial<MRT_TableState<TData>> | undefined;
|
258
259
|
columnVirtualizerInstanceRef?: React.MutableRefObject<import("@tanstack/react-virtual").Virtualizer<HTMLDivElement, HTMLTableCellElement> | null> | undefined;
|
259
|
-
columnVirtualizerProps?: Partial<import("@tanstack/react-virtual").VirtualizerOptions<HTMLDivElement, HTMLTableCellElement>> | ((
|
260
|
+
columnVirtualizerProps?: Partial<import("@tanstack/react-virtual").VirtualizerOptions<HTMLDivElement, HTMLTableCellElement>> | ((props: {
|
260
261
|
table: MRT_TableInstance<TData>;
|
261
262
|
}) => Partial<import("@tanstack/react-virtual").VirtualizerOptions<HTMLDivElement, HTMLTableCellElement>>) | undefined;
|
262
263
|
rowVirtualizerInstanceRef?: React.MutableRefObject<import("@tanstack/react-virtual").Virtualizer<HTMLDivElement, HTMLTableRowElement> | null> | undefined;
|
263
|
-
rowVirtualizerProps?: Partial<import("@tanstack/react-virtual").VirtualizerOptions<HTMLDivElement, HTMLTableRowElement>> | ((
|
264
|
+
rowVirtualizerProps?: Partial<import("@tanstack/react-virtual").VirtualizerOptions<HTMLDivElement, HTMLTableRowElement>> | ((props: {
|
264
265
|
table: MRT_TableInstance<TData>;
|
265
266
|
}) => Partial<import("@tanstack/react-virtual").VirtualizerOptions<HTMLDivElement, HTMLTableRowElement>>) | undefined;
|
266
267
|
tableInstanceRef?: React.MutableRefObject<MRT_TableInstance<TData> | null> | undefined;
|