material-react-table 0.7.0-alpha.1 → 0.7.0-alpha.12
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 +29 -21
- package/dist/MaterialReactTable.d.ts +236 -75
- package/dist/buttons/MRT_CopyButton.d.ts +1 -2
- package/dist/buttons/{MRT_ToggleSearchButton.d.ts → MRT_ToggleGlobalFilterButton.d.ts} +1 -1
- package/dist/localization.d.ts +1 -0
- package/dist/material-react-table.cjs.development.js +399 -1011
- package/dist/material-react-table.cjs.development.js.map +1 -1
- package/dist/material-react-table.cjs.production.min.js +1 -1
- package/dist/material-react-table.cjs.production.min.js.map +1 -1
- package/dist/material-react-table.esm.js +400 -1012
- package/dist/material-react-table.esm.js.map +1 -1
- package/dist/utils.d.ts +1 -1
- package/package.json +7 -7
- package/src/MaterialReactTable.tsx +436 -143
- package/src/body/MRT_TableBody.tsx +1 -1
- package/src/body/MRT_TableBodyCell.tsx +11 -8
- package/src/body/MRT_TableBodyRow.tsx +2 -2
- package/src/body/MRT_TableDetailPanel.tsx +6 -4
- package/src/buttons/MRT_CopyButton.tsx +3 -4
- package/src/buttons/MRT_EditActionButtons.tsx +6 -4
- package/src/buttons/MRT_ExpandButton.tsx +1 -1
- package/src/buttons/MRT_FullScreenToggleButton.tsx +13 -3
- package/src/buttons/MRT_ToggleColumnActionMenuButton.tsx +5 -2
- package/src/buttons/MRT_ToggleDensePaddingButton.tsx +13 -3
- package/src/buttons/MRT_ToggleFiltersButton.tsx +13 -3
- package/src/buttons/MRT_ToggleGlobalFilterButton.tsx +57 -0
- package/src/buttons/MRT_ToggleRowActionMenuButton.tsx +7 -7
- package/src/footer/MRT_TableFooter.tsx +1 -1
- package/src/footer/MRT_TableFooterCell.tsx +2 -2
- package/src/footer/MRT_TableFooterRow.tsx +1 -1
- package/src/head/MRT_TableHead.tsx +1 -1
- package/src/head/MRT_TableHeadCell.tsx +23 -30
- package/src/head/MRT_TableHeadRow.tsx +1 -1
- package/src/inputs/MRT_EditCellTextField.tsx +27 -14
- package/src/inputs/MRT_FilterTextField.tsx +3 -3
- package/src/inputs/MRT_SearchTextField.tsx +10 -5
- package/src/inputs/MRT_SelectCheckbox.tsx +9 -7
- package/src/localization.ts +2 -1
- package/src/menus/MRT_ColumnActionMenu.tsx +4 -4
- package/src/menus/MRT_FilterTypeMenu.tsx +3 -6
- package/src/menus/MRT_RowActionMenu.tsx +7 -5
- package/src/menus/MRT_ShowHideColumnsMenuItems.tsx +5 -6
- package/src/table/MRT_Table.tsx +1 -1
- package/src/table/MRT_TableContainer.tsx +20 -24
- package/src/table/MRT_TablePaper.tsx +9 -5
- package/src/table/MRT_TableRoot.tsx +44 -40
- package/src/toolbar/MRT_LinearProgressBar.tsx +1 -1
- package/src/toolbar/MRT_TablePagination.tsx +6 -2
- package/src/toolbar/MRT_ToolbarAlertBanner.tsx +2 -1
- package/src/toolbar/MRT_ToolbarBottom.tsx +1 -1
- package/src/toolbar/MRT_ToolbarInternalButtons.tsx +12 -10
- package/src/toolbar/MRT_ToolbarTop.tsx +2 -2
- package/src/buttons/MRT_ToggleSearchButton.tsx +0 -46
package/README.md
CHANGED
|
@@ -1,47 +1,55 @@
|
|
|
1
1
|
# Material React Table
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
- Inspired by material-table and the material-ui DataGrid
|
|
5
|
-
- Written from the ground up in TypeScript, Material-UI, and React Table
|
|
3
|
+
> This Project is based on react-table v8, which itself is still in alpha, and therefore this package is also still in alpha
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
- A fully featured Material UI v5 implementation of react-table v8 (alpha)
|
|
6
|
+
- Inspired by material-table and the MUI X DataGrid
|
|
7
|
+
- Written from the ground up in TypeScript, Material UI, and React Table
|
|
8
|
+
- All internal Material UI components are easily customizable
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
## This project is in alpha, but feel free to install and explore
|
|
10
11
|
|
|
11
|
-
View
|
|
12
|
+
View the [docs (alpha) site](https://www.material-react-table.com/)
|
|
12
13
|
|
|
13
|
-
View
|
|
14
|
+
View additional [storybook examples](https://www.material-react-table.dev/)
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
View the [github source code](https://github.com/KevinVandy/material-react-table) and [github open issues](https://github.com/KevinVandy/material-react-table/issues)
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
Join the [discord](https://discord.gg/5wqyRx6fnm) server to join in on the development discussion or ask questions
|
|
18
19
|
|
|
19
|
-
### Features (Still In Active Development)
|
|
20
|
+
### Features (Some Still In Active Development)
|
|
20
21
|
|
|
21
|
-
- [
|
|
22
|
-
- [ ] Column Resizing (in dev)
|
|
23
|
-
- [x] Cell Editing
|
|
22
|
+
- [x] Click To Copy Cell Values
|
|
24
23
|
- [x] Column Actions
|
|
25
24
|
- [x] Column Hiding
|
|
26
|
-
- [x]
|
|
25
|
+
- [x] Column Grouping (Group By and Aggregates)
|
|
26
|
+
- [ ] Column Ordering (react-dnd planned)
|
|
27
|
+
- [x] Column Pinning
|
|
28
|
+
- [x] Column Resizing (work in progress)
|
|
29
|
+
- [x] Custom Icons
|
|
30
|
+
- [x] Custom Styling and internal Mui Components
|
|
31
|
+
- [x] Data Editing
|
|
27
32
|
- [x] Dense Padding Toggle
|
|
28
|
-
- [x] Localization
|
|
29
33
|
- [x] Filtering
|
|
30
|
-
- [x]
|
|
34
|
+
- [x] Fullscreen
|
|
35
|
+
- [ ] Global Search (broken in react-table v8 :( ))
|
|
31
36
|
- [x] HeaderGroups
|
|
32
|
-
- [x]
|
|
37
|
+
- [x] Localization i18n
|
|
38
|
+
- [x] Pagination (supports client-side and server-side)
|
|
33
39
|
- [x] Row Actions
|
|
34
|
-
- [x] Selection
|
|
40
|
+
- [x] Row Selection
|
|
41
|
+
- [x] SSR compatible
|
|
35
42
|
- [x] Sorting
|
|
36
43
|
- [x] Toolbars
|
|
37
|
-
- [x] Tree Data
|
|
44
|
+
- [x] Tree Data / Expanding Subrows
|
|
45
|
+
- [ ] Virtualization (planned)
|
|
38
46
|
|
|
39
47
|
### Installation
|
|
40
48
|
|
|
41
|
-
1. Install Peer Dependencies (
|
|
49
|
+
1. Install Peer Dependencies (Material UI v5)
|
|
42
50
|
|
|
43
51
|
```bash
|
|
44
|
-
npm install @mui/material @mui/icons-material @emotion/react @emotion/styled
|
|
52
|
+
npm install @mui/material @mui/icons-material @emotion/react @emotion/styled
|
|
45
53
|
```
|
|
46
54
|
|
|
47
55
|
2. Install material-react-table
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ChangeEvent, Dispatch, FC, MouseEvent, ReactNode, SetStateAction } from 'react';
|
|
1
|
+
import { ChangeEvent, Dispatch, FC, FocusEvent, MouseEvent, ReactNode, SetStateAction } from 'react';
|
|
2
2
|
import { AlertProps, ButtonProps, CheckboxProps, IconButtonProps, LinearProgressProps, PaperProps, SkeletonProps, TableBodyProps, TableCellProps, TableContainerProps, TableFooterProps, TableHeadProps, TablePaginationProps, TableProps, TableRowProps, TextFieldProps, ToolbarProps } from '@mui/material';
|
|
3
|
-
import { Cell, Column, ColumnDef, DefaultGenerics, FilterType, Header, HeaderGroup, Options, Overwrite, PaginationState, Row, TableInstance, TableState } from '@tanstack/react-table';
|
|
3
|
+
import { Cell, Column, ColumnDef, DefaultGenerics, FilterType, Header, HeaderGroup, Options, Overwrite, PaginationState, Row, TableInstance, TableState, VisibilityState } from '@tanstack/react-table';
|
|
4
4
|
import { MRT_Localization } from './localization';
|
|
5
5
|
import { MRT_Icons } from './icons';
|
|
6
6
|
import { MRT_FILTER_TYPE } from './enums';
|
|
@@ -23,11 +23,11 @@ export declare type MRT_TableInstance<D extends Record<string, any> = {}> = Omit
|
|
|
23
23
|
}>>, 'getAllColumns' | 'getAllLeafColumns' | 'getExpandedRowModel' | 'getPaginationRowModel' | 'getPrePaginationRowModel' | 'getRowModel' | 'getSelectedRowModel' | 'getState' | 'options'> & {
|
|
24
24
|
getAllColumns: () => MRT_ColumnInstance<D>[];
|
|
25
25
|
getAllLeafColumns: () => MRT_ColumnInstance<D>[];
|
|
26
|
-
getExpandedRowModel: () => MRT_RowModel
|
|
27
|
-
getPaginationRowModel: () => MRT_RowModel
|
|
28
|
-
getPrePaginationRowModel: () => MRT_RowModel
|
|
29
|
-
getRowModel: () => MRT_RowModel
|
|
30
|
-
getSelectedRowModel: () => MRT_RowModel
|
|
26
|
+
getExpandedRowModel: () => MRT_RowModel<D>;
|
|
27
|
+
getPaginationRowModel: () => MRT_RowModel<D>;
|
|
28
|
+
getPrePaginationRowModel: () => MRT_RowModel<D>;
|
|
29
|
+
getRowModel: () => MRT_RowModel<D>;
|
|
30
|
+
getSelectedRowModel: () => MRT_RowModel<D>;
|
|
31
31
|
getState: () => MRT_TableState<D>;
|
|
32
32
|
options: MaterialReactTableProps<D> & {
|
|
33
33
|
icons: MRT_Icons;
|
|
@@ -36,16 +36,16 @@ export declare type MRT_TableInstance<D extends Record<string, any> = {}> = Omit
|
|
|
36
36
|
[key in MRT_FILTER_TYPE]: any;
|
|
37
37
|
};
|
|
38
38
|
localization: MRT_Localization;
|
|
39
|
-
setCurrentEditingRow: Dispatch<SetStateAction<MRT_Row<D> | null>>;
|
|
40
|
-
setCurrentFilterTypes: Dispatch<SetStateAction<{
|
|
41
|
-
[key: string]: MRT_FilterType;
|
|
42
|
-
}>>;
|
|
43
|
-
setCurrentGlobalFilterType: Dispatch<SetStateAction<MRT_FILTER_TYPE>>;
|
|
44
|
-
setIsDensePadding: Dispatch<SetStateAction<boolean>>;
|
|
45
|
-
setIsFullScreen: Dispatch<SetStateAction<boolean>>;
|
|
46
|
-
setShowFilters: Dispatch<SetStateAction<boolean>>;
|
|
47
|
-
setShowSearch: Dispatch<SetStateAction<boolean>>;
|
|
48
39
|
};
|
|
40
|
+
setCurrentEditingRow: Dispatch<SetStateAction<MRT_Row<D> | null>>;
|
|
41
|
+
setCurrentFilterTypes: Dispatch<SetStateAction<{
|
|
42
|
+
[key: string]: MRT_FilterType;
|
|
43
|
+
}>>;
|
|
44
|
+
setCurrentGlobalFilterType: Dispatch<SetStateAction<MRT_FILTER_TYPE>>;
|
|
45
|
+
setIsDensePadding: Dispatch<SetStateAction<boolean>>;
|
|
46
|
+
setIsFullScreen: Dispatch<SetStateAction<boolean>>;
|
|
47
|
+
setShowFilters: Dispatch<SetStateAction<boolean>>;
|
|
48
|
+
setShowGlobalFilter: Dispatch<SetStateAction<boolean>>;
|
|
49
49
|
};
|
|
50
50
|
export declare type MRT_TableState<D extends Record<string, any> = {}> = Omit<TableState, 'pagination'> & {
|
|
51
51
|
currentEditingRow: MRT_Row<D> | null;
|
|
@@ -54,14 +54,13 @@ export declare type MRT_TableState<D extends Record<string, any> = {}> = Omit<Ta
|
|
|
54
54
|
isDensePadding: boolean;
|
|
55
55
|
isFullScreen: boolean;
|
|
56
56
|
showFilters: boolean;
|
|
57
|
-
|
|
57
|
+
showGlobalFilter: boolean;
|
|
58
58
|
pagination: Partial<PaginationState>;
|
|
59
59
|
};
|
|
60
60
|
export declare type MRT_ColumnInterface<D extends Record<string, any> = {}> = Omit<ColumnDef<D>, 'header' | 'footer' | 'columns'> & {
|
|
61
|
-
Edit?: ({ cell, tableInstance,
|
|
61
|
+
Edit?: ({ cell, tableInstance, }: {
|
|
62
62
|
cell: MRT_Cell<D>;
|
|
63
63
|
tableInstance: MRT_TableInstance<D>;
|
|
64
|
-
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
65
64
|
}) => ReactNode;
|
|
66
65
|
Filter?: ({ header, tableInstance, }: {
|
|
67
66
|
header: MRT_Header<D>;
|
|
@@ -84,8 +83,6 @@ export declare type MRT_ColumnInterface<D extends Record<string, any> = {}> = Om
|
|
|
84
83
|
enableClickToCopy?: boolean;
|
|
85
84
|
enableColumnActions?: boolean;
|
|
86
85
|
enableEditing?: boolean;
|
|
87
|
-
enableColumnFilters?: boolean;
|
|
88
|
-
enableHiding?: boolean;
|
|
89
86
|
enabledFilterTypes?: (MRT_FILTER_TYPE | string)[];
|
|
90
87
|
filter?: MRT_FilterType | string | FilterType<D>;
|
|
91
88
|
filterSelectOptions?: (string | {
|
|
@@ -94,15 +91,48 @@ export declare type MRT_ColumnInterface<D extends Record<string, any> = {}> = Om
|
|
|
94
91
|
})[];
|
|
95
92
|
footer?: string;
|
|
96
93
|
header: string;
|
|
97
|
-
muiTableBodyCellCopyButtonProps?: ButtonProps | ((cell
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
94
|
+
muiTableBodyCellCopyButtonProps?: ButtonProps | (({ tableInstance, cell, }: {
|
|
95
|
+
tableInstance: MRT_TableInstance;
|
|
96
|
+
cell: MRT_Cell<D>;
|
|
97
|
+
}) => ButtonProps);
|
|
98
|
+
muiTableBodyCellEditTextFieldProps?: TextFieldProps | (({ tableInstance, cell, }: {
|
|
99
|
+
tableInstance: MRT_TableInstance;
|
|
100
|
+
cell: MRT_Cell<D>;
|
|
101
|
+
}) => TextFieldProps);
|
|
102
|
+
muiTableBodyCellProps?: TableCellProps | (({ tableInstance, cell, }: {
|
|
103
|
+
tableInstance: MRT_TableInstance;
|
|
104
|
+
cell: MRT_Cell<D>;
|
|
105
|
+
}) => TableCellProps);
|
|
106
|
+
muiTableFooterCellProps?: TableCellProps | (({ tableInstance, column, }: {
|
|
107
|
+
tableInstance: MRT_TableInstance;
|
|
108
|
+
column: MRT_ColumnInstance<D>;
|
|
109
|
+
}) => TableCellProps);
|
|
110
|
+
muiTableHeadCellColumnActionsButtonProps?: IconButtonProps | (({ tableInstance, column, }: {
|
|
111
|
+
tableInstance: MRT_TableInstance;
|
|
112
|
+
column: MRT_ColumnInstance<D>;
|
|
113
|
+
}) => IconButtonProps);
|
|
114
|
+
muiTableHeadCellFilterTextFieldProps?: TextFieldProps | (({ tableInstance, column, }: {
|
|
115
|
+
tableInstance: MRT_TableInstance;
|
|
116
|
+
column: MRT_ColumnInstance<D>;
|
|
117
|
+
}) => TextFieldProps);
|
|
118
|
+
muiTableHeadCellProps?: TableCellProps | (({ tableInstance, column, }: {
|
|
119
|
+
tableInstance: MRT_TableInstance;
|
|
120
|
+
column: MRT_ColumnInstance<D>;
|
|
121
|
+
}) => TableCellProps);
|
|
122
|
+
onCellEditBlur?: ({ cell, event, tableInstance, }: {
|
|
123
|
+
event: FocusEvent<HTMLInputElement>;
|
|
124
|
+
cell: MRT_Cell<D>;
|
|
125
|
+
tableInstance: MRT_TableInstance<D>;
|
|
126
|
+
}) => void;
|
|
127
|
+
onCellEditChange?: ({ cell, event, tableInstance, }: {
|
|
128
|
+
event: ChangeEvent<HTMLInputElement>;
|
|
129
|
+
cell: MRT_Cell<D>;
|
|
130
|
+
tableInstance: MRT_TableInstance<D>;
|
|
131
|
+
}) => void;
|
|
132
|
+
onColumnFilterValueChange?: ({ event, filterValue, }: {
|
|
133
|
+
event: ChangeEvent<HTMLInputElement>;
|
|
134
|
+
filterValue: any;
|
|
135
|
+
}) => void;
|
|
106
136
|
};
|
|
107
137
|
export declare type MRT_ColumnInstance<D extends Record<string, any> = {}> = Omit<Column<D>, 'header' | 'footer' | 'columns'> & MRT_ColumnInterface<D> & {
|
|
108
138
|
columns?: MRT_ColumnInstance<D>[];
|
|
@@ -130,16 +160,15 @@ export declare type MRT_FilterType = MRT_FILTER_TYPE | Function;
|
|
|
130
160
|
export declare type MaterialReactTableProps<D extends Record<string, any> = {}> = MRT_TableOptions<D> & {
|
|
131
161
|
enableClickToCopy?: boolean;
|
|
132
162
|
enableColumnActions?: boolean;
|
|
133
|
-
enableColumnPinning?: boolean;
|
|
134
163
|
enableDensePaddingToggle?: boolean;
|
|
164
|
+
enableEditing?: boolean;
|
|
135
165
|
enableExpandAll?: boolean;
|
|
136
166
|
enableFullScreenToggle?: boolean;
|
|
137
167
|
enablePagination?: boolean;
|
|
138
168
|
enableRowActions?: boolean;
|
|
139
|
-
enableStickyHeader?: boolean;
|
|
140
|
-
enableRowEditing?: boolean;
|
|
141
169
|
enableRowNumbers?: boolean;
|
|
142
170
|
enableSelectAll?: boolean;
|
|
171
|
+
enableStickyHeader?: boolean;
|
|
143
172
|
enabledGlobalFilterTypes?: (MRT_FILTER_TYPE | string)[];
|
|
144
173
|
filterTypes?: {
|
|
145
174
|
[key in MRT_FILTER_TYPE]: any;
|
|
@@ -151,53 +180,185 @@ export declare type MaterialReactTableProps<D extends Record<string, any> = {}>
|
|
|
151
180
|
hideToolbarTop?: boolean;
|
|
152
181
|
icons?: Partial<MRT_Icons>;
|
|
153
182
|
idPrefix?: string;
|
|
154
|
-
isReloading?: boolean;
|
|
155
183
|
isLoading?: boolean;
|
|
184
|
+
isReloading?: boolean;
|
|
156
185
|
localization?: Partial<MRT_Localization>;
|
|
157
|
-
muiLinearProgressProps?: LinearProgressProps | ((tableInstance:
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
186
|
+
muiLinearProgressProps?: LinearProgressProps | (({ tableInstance, }: {
|
|
187
|
+
tableInstance: MRT_TableInstance;
|
|
188
|
+
}) => LinearProgressProps);
|
|
189
|
+
muiSearchTextFieldProps?: TextFieldProps | (({ tableInstance, }: {
|
|
190
|
+
tableInstance: MRT_TableInstance;
|
|
191
|
+
}) => TextFieldProps);
|
|
192
|
+
muiSelectCheckboxProps?: CheckboxProps | (({ tableInstance, isSelectAll, row, }: {
|
|
193
|
+
tableInstance: MRT_TableInstance;
|
|
194
|
+
isSelectAll: boolean;
|
|
195
|
+
row?: MRT_Row<D>;
|
|
196
|
+
}) => CheckboxProps);
|
|
197
|
+
muiTableBodyCellCopyButtonProps?: ButtonProps | (({ tableInstance, cell, }: {
|
|
198
|
+
tableInstance: MRT_TableInstance;
|
|
199
|
+
cell: MRT_Cell<D>;
|
|
200
|
+
}) => ButtonProps);
|
|
201
|
+
muiTableBodyCellEditTextFieldProps?: TextFieldProps | (({ tableInstance, cell, }: {
|
|
202
|
+
tableInstance: MRT_TableInstance;
|
|
203
|
+
cell: MRT_Cell<D>;
|
|
204
|
+
}) => TextFieldProps);
|
|
205
|
+
muiTableBodyCellProps?: TableCellProps | (({ tableInstance, cell, }: {
|
|
206
|
+
tableInstance: MRT_TableInstance;
|
|
207
|
+
cell: MRT_Cell<D>;
|
|
208
|
+
}) => TableCellProps);
|
|
209
|
+
muiTableBodyCellSkeletonProps?: SkeletonProps | (({ tableInstance, cell, }: {
|
|
210
|
+
tableInstance: MRT_TableInstance;
|
|
211
|
+
cell: MRT_Cell<D>;
|
|
212
|
+
}) => SkeletonProps);
|
|
213
|
+
muiTableBodyProps?: TableBodyProps | (({ tableInstance, }: {
|
|
214
|
+
tableInstance: MRT_TableInstance;
|
|
215
|
+
}) => TableBodyProps);
|
|
216
|
+
muiTableBodyRowProps?: TableRowProps | (({ tableInstance, row, }: {
|
|
217
|
+
tableInstance: MRT_TableInstance;
|
|
218
|
+
row: MRT_Row<D>;
|
|
219
|
+
}) => TableRowProps);
|
|
220
|
+
muiTableContainerProps?: TableContainerProps | (({ tableInstance, }: {
|
|
221
|
+
tableInstance: MRT_TableInstance;
|
|
222
|
+
}) => TableContainerProps);
|
|
223
|
+
muiTableDetailPanelProps?: TableCellProps | (({ tableInstance, row, }: {
|
|
224
|
+
tableInstance: MRT_TableInstance;
|
|
225
|
+
row: MRT_Row<D>;
|
|
226
|
+
}) => TableCellProps);
|
|
227
|
+
muiTableFooterCellProps?: TableCellProps | (({ tableInstance, column, }: {
|
|
228
|
+
tableInstance: MRT_TableInstance;
|
|
229
|
+
column: MRT_ColumnInstance<D>;
|
|
230
|
+
}) => TableCellProps);
|
|
231
|
+
muiTableFooterProps?: TableFooterProps | (({ tableInstance, }: {
|
|
232
|
+
tableInstance: MRT_TableInstance;
|
|
233
|
+
}) => TableFooterProps);
|
|
234
|
+
muiTableFooterRowProps?: TableRowProps | (({ tableInstance, footerGroup, }: {
|
|
235
|
+
tableInstance: MRT_TableInstance;
|
|
236
|
+
footerGroup: MRT_HeaderGroup<D>;
|
|
237
|
+
}) => TableRowProps);
|
|
238
|
+
muiTableHeadCellColumnActionsButtonProps?: IconButtonProps | (({ tableInstance, column, }: {
|
|
239
|
+
tableInstance: MRT_TableInstance;
|
|
240
|
+
column: MRT_ColumnInstance<D>;
|
|
241
|
+
}) => IconButtonProps);
|
|
242
|
+
muiTableHeadCellFilterTextFieldProps?: TextFieldProps | (({ tableInstance, column, }: {
|
|
243
|
+
tableInstance: MRT_TableInstance;
|
|
244
|
+
column: MRT_ColumnInstance<D>;
|
|
245
|
+
}) => TextFieldProps);
|
|
246
|
+
muiTableHeadCellProps?: TableCellProps | (({ tableInstance, column, }: {
|
|
247
|
+
tableInstance: MRT_TableInstance;
|
|
248
|
+
column: MRT_ColumnInstance<D>;
|
|
249
|
+
}) => TableCellProps);
|
|
250
|
+
muiTableHeadProps?: TableHeadProps | (({ tableInstance, }: {
|
|
251
|
+
tableInstance: MRT_TableInstance;
|
|
252
|
+
}) => TableHeadProps);
|
|
253
|
+
muiTableHeadRowProps?: TableRowProps | (({ tableInstance, headerGroup, }: {
|
|
254
|
+
tableInstance: MRT_TableInstance;
|
|
255
|
+
headerGroup: MRT_HeaderGroup<D>;
|
|
256
|
+
}) => TableRowProps);
|
|
257
|
+
muiTablePaperProps?: PaperProps | (({ tableInstance, }: {
|
|
258
|
+
tableInstance: MRT_TableInstance;
|
|
259
|
+
}) => PaperProps);
|
|
260
|
+
muiTablePaginationProps?: Partial<TablePaginationProps> | (({ tableInstance, }: {
|
|
261
|
+
tableInstance: MRT_TableInstance;
|
|
262
|
+
}) => Partial<TablePaginationProps>);
|
|
263
|
+
muiTableProps?: TableProps | (({ tableInstance, }: {
|
|
264
|
+
tableInstance: MRT_TableInstance;
|
|
265
|
+
}) => TableProps);
|
|
266
|
+
muiTableToolbarAlertBannerProps?: AlertProps | (({ tableInstance, }: {
|
|
267
|
+
tableInstance: MRT_TableInstance;
|
|
268
|
+
}) => AlertProps);
|
|
269
|
+
muiTableToolbarBottomProps?: ToolbarProps | (({ tableInstance, }: {
|
|
270
|
+
tableInstance: MRT_TableInstance;
|
|
271
|
+
}) => ToolbarProps);
|
|
272
|
+
muiTableToolbarTopProps?: ToolbarProps | (({ tableInstance, }: {
|
|
273
|
+
tableInstance: MRT_TableInstance;
|
|
274
|
+
}) => ToolbarProps);
|
|
275
|
+
onCellClick?: ({ cell, event, tableInstance, }: {
|
|
276
|
+
cell: MRT_Cell<D>;
|
|
277
|
+
tableInstance: MRT_TableInstance<D>;
|
|
278
|
+
event: MouseEvent<HTMLTableCellElement>;
|
|
279
|
+
}) => void;
|
|
280
|
+
onDetailPanelClick?: ({ event, row, tableInstance, }: {
|
|
281
|
+
event: MouseEvent<HTMLTableCellElement>;
|
|
282
|
+
row: MRT_Row<D>;
|
|
283
|
+
tableInstance: MRT_TableInstance<D>;
|
|
284
|
+
}) => void;
|
|
285
|
+
onGlobalFilterChange?: ({ event, tableInstance, }: {
|
|
286
|
+
event: ChangeEvent<HTMLInputElement>;
|
|
287
|
+
tableInstance: MRT_TableInstance<D>;
|
|
288
|
+
}) => void;
|
|
289
|
+
onRowClick?: ({ event, row, tableInstance, }: {
|
|
290
|
+
event: MouseEvent<HTMLTableRowElement>;
|
|
291
|
+
row: MRT_Row<D>;
|
|
292
|
+
tableInstance: MRT_TableInstance<D>;
|
|
293
|
+
}) => void;
|
|
294
|
+
onEditSubmit?: ({ row, tableInstance, }: {
|
|
295
|
+
row: MRT_Row<D>;
|
|
296
|
+
tableInstance: MRT_TableInstance<D>;
|
|
297
|
+
}) => Promise<void> | void;
|
|
298
|
+
onRowExpandChange?: ({ event, row, }: {
|
|
299
|
+
event: MouseEvent<HTMLButtonElement>;
|
|
300
|
+
row: MRT_Row<D>;
|
|
301
|
+
tableInstance: MRT_TableInstance<D>;
|
|
302
|
+
}) => void;
|
|
303
|
+
onSelectAllChange?: ({ event, selectedRows, tableInstance, }: {
|
|
304
|
+
event: ChangeEvent;
|
|
305
|
+
selectedRows: MRT_Row<D>[];
|
|
306
|
+
tableInstance: MRT_TableInstance<D>;
|
|
307
|
+
}) => void;
|
|
308
|
+
onSelectChange?: ({ event, row, selectedRows, tableInstance, }: {
|
|
309
|
+
event: ChangeEvent;
|
|
310
|
+
row: MRT_Row<D>;
|
|
311
|
+
selectedRows: MRT_Row<D>[];
|
|
312
|
+
tableInstance: MRT_TableInstance<D>;
|
|
313
|
+
}) => void;
|
|
314
|
+
onToggleColumnVisibility?: ({ column, columnVisibility, tableInstance, }: {
|
|
315
|
+
column: MRT_ColumnInstance<D>;
|
|
316
|
+
columnVisibility: VisibilityState;
|
|
317
|
+
tableInstance: MRT_TableInstance<D>;
|
|
318
|
+
}) => void;
|
|
319
|
+
onToggleDensePadding?: ({ event, isDensePadding, tableInstance, }: {
|
|
320
|
+
event: MouseEvent<HTMLButtonElement>;
|
|
321
|
+
isDensePadding: boolean;
|
|
322
|
+
tableInstance: MRT_TableInstance<D>;
|
|
323
|
+
}) => void;
|
|
324
|
+
onToggleFullScreen?: ({ event, isFullScreen, tableInstance, }: {
|
|
325
|
+
event: MouseEvent<HTMLButtonElement>;
|
|
326
|
+
isFullScreen: boolean;
|
|
327
|
+
tableInstance: MRT_TableInstance<D>;
|
|
328
|
+
}) => void;
|
|
329
|
+
onToggleShowFilters?: ({ event, showFilters, tableInstance, }: {
|
|
330
|
+
event: MouseEvent<HTMLButtonElement>;
|
|
331
|
+
showFilters: boolean;
|
|
332
|
+
tableInstance: MRT_TableInstance<D>;
|
|
333
|
+
}) => void;
|
|
334
|
+
onToggleShowGlobalFilter?: ({ event, showGlobalFilter, tableInstance, }: {
|
|
335
|
+
event: MouseEvent<HTMLButtonElement>;
|
|
336
|
+
showGlobalFilter: boolean;
|
|
337
|
+
tableInstance: MRT_TableInstance<D>;
|
|
338
|
+
}) => void;
|
|
191
339
|
positionActionsColumn?: 'first' | 'last';
|
|
192
340
|
positionPagination?: 'bottom' | 'top' | 'both';
|
|
193
341
|
positionToolbarActions?: 'bottom' | 'top';
|
|
194
342
|
positionToolbarAlertBanner?: 'bottom' | 'top';
|
|
195
|
-
renderDetailPanel?: (row
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
343
|
+
renderDetailPanel?: ({ row, tableInstance, }: {
|
|
344
|
+
row: MRT_Row<D>;
|
|
345
|
+
tableInstance: MRT_TableInstance<D>;
|
|
346
|
+
}) => ReactNode;
|
|
347
|
+
renderRowActionMenuItems?: ({ closeMenu, row, tableInstance, }: {
|
|
348
|
+
closeMenu: () => void;
|
|
349
|
+
row: MRT_Row<D>;
|
|
350
|
+
tableInstance: MRT_TableInstance<D>;
|
|
351
|
+
}) => ReactNode[];
|
|
352
|
+
renderRowActions?: ({ row, tableInstance, }: {
|
|
353
|
+
row: MRT_Row<D>;
|
|
354
|
+
tableInstance: MRT_TableInstance<D>;
|
|
355
|
+
}) => ReactNode;
|
|
356
|
+
renderToolbarCustomActions?: ({ tableInstance, }: {
|
|
357
|
+
tableInstance: MRT_TableInstance<D>;
|
|
358
|
+
}) => ReactNode;
|
|
359
|
+
renderToolbarInternalActions?: ({ tableInstance, MRT_ToggleGlobalFilterButton, MRT_ToggleFiltersButton, MRT_ShowHideColumnsButton, MRT_ToggleDensePaddingButton, MRT_FullScreenToggleButton, }: {
|
|
360
|
+
tableInstance: MRT_TableInstance<D>;
|
|
361
|
+
MRT_ToggleGlobalFilterButton: FC<IconButtonProps & {
|
|
201
362
|
tableInstance: MRT_TableInstance<D>;
|
|
202
363
|
}>;
|
|
203
364
|
MRT_ToggleFiltersButton: FC<IconButtonProps & {
|
|
@@ -214,5 +375,5 @@ export declare type MaterialReactTableProps<D extends Record<string, any> = {}>
|
|
|
214
375
|
}>;
|
|
215
376
|
}) => ReactNode;
|
|
216
377
|
};
|
|
217
|
-
declare const _default: <D extends Record<string, any> = {}>({ enableColumnActions, enableColumnFilters, enableDensePaddingToggle, enableExpandAll, enableFullScreenToggle, enableGlobalFilter, enableHiding, enablePagination, enableSelectAll, enableSorting, enableStickyHeader,
|
|
378
|
+
declare const _default: <D extends Record<string, any> = {}>({ autoResetExpanded, enableColumnActions, enableColumnFilters, enableDensePaddingToggle, enableExpandAll, enableFilters, enableFullScreenToggle, enableGlobalFilter, enableHiding, enableMultiRowSelection, enablePagination, enableSelectAll, enableSorting, enableStickyHeader, icons, localization, positionActionsColumn, positionPagination, positionToolbarActions, positionToolbarAlertBanner, ...rest }: MaterialReactTableProps<D>) => JSX.Element;
|
|
218
379
|
export default _default;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { FC
|
|
1
|
+
import { FC } from 'react';
|
|
2
2
|
import { MRT_Cell, MRT_TableInstance } from '..';
|
|
3
3
|
interface Props {
|
|
4
4
|
cell: MRT_Cell;
|
|
5
|
-
children: ReactNode;
|
|
6
5
|
tableInstance: MRT_TableInstance;
|
|
7
6
|
}
|
|
8
7
|
export declare const MRT_CopyButton: FC<Props>;
|