material-react-table 2.0.5 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (150) hide show
  1. package/dist/index.d.ts +2 -1
  2. package/dist/index.esm.js +616 -545
  3. package/dist/index.esm.js.map +1 -1
  4. package/dist/index.js +614 -543
  5. package/dist/index.js.map +1 -1
  6. package/locales/fr/index.esm.js +1 -1
  7. package/locales/fr/index.js +1 -1
  8. package/locales/he/index.d.ts +3 -0
  9. package/locales/he/index.esm.d.ts +3 -0
  10. package/locales/he/index.esm.js +93 -0
  11. package/locales/he/index.js +97 -0
  12. package/locales/he/package.json +6 -0
  13. package/package.json +25 -25
  14. package/src/body/MRT_TableBodyCell.tsx +22 -19
  15. package/src/body/MRT_TableBodyCellValue.tsx +9 -9
  16. package/src/body/MRT_TableBodyRow.tsx +13 -13
  17. package/src/buttons/MRT_RowPinButton.tsx +2 -2
  18. package/src/buttons/MRT_ToggleDensePaddingButton.tsx +2 -2
  19. package/src/footer/MRT_TableFooterCell.tsx +2 -2
  20. package/src/head/MRT_TableHeadCell.tsx +25 -20
  21. package/src/head/MRT_TableHeadCellResizeHandle.tsx +19 -9
  22. package/src/hooks/useMRT_DisplayColumns.tsx +172 -125
  23. package/src/hooks/useMRT_TableOptions.ts +8 -0
  24. package/src/inputs/MRT_EditCellTextField.tsx +3 -1
  25. package/src/inputs/MRT_FilterCheckbox.tsx +2 -2
  26. package/src/inputs/MRT_FilterTextField.tsx +17 -17
  27. package/src/inputs/MRT_SelectCheckbox.tsx +2 -2
  28. package/src/locales/fr.ts +1 -1
  29. package/src/locales/he.ts +94 -0
  30. package/src/menus/MRT_ShowHideColumnsMenuItems.tsx +2 -2
  31. package/src/style.utils.ts +2 -2
  32. package/src/toolbar/MRT_TablePagination.tsx +8 -4
  33. package/src/toolbar/MRT_ToolbarAlertBanner.tsx +6 -6
  34. package/src/types.ts +2 -2
  35. package/dist/types/MaterialReactTable.d.ts +0 -7
  36. package/dist/types/aggregationFns.d.ts +0 -11
  37. package/dist/types/body/MRT_TableBody.d.ts +0 -13
  38. package/dist/types/body/MRT_TableBodyCell.d.ts +0 -15
  39. package/dist/types/body/MRT_TableBodyCellValue.d.ts +0 -8
  40. package/dist/types/body/MRT_TableBodyRow.d.ts +0 -18
  41. package/dist/types/body/MRT_TableBodyRowGrabHandle.d.ts +0 -10
  42. package/dist/types/body/MRT_TableBodyRowPinButton.d.ts +0 -8
  43. package/dist/types/body/MRT_TableDetailPanel.d.ts +0 -13
  44. package/dist/types/body/index.d.ts +0 -7
  45. package/dist/types/buttons/MRT_ColumnPinningButtons.d.ts +0 -8
  46. package/dist/types/buttons/MRT_CopyButton.d.ts +0 -8
  47. package/dist/types/buttons/MRT_EditActionButtons.d.ts +0 -9
  48. package/dist/types/buttons/MRT_ExpandAllButton.d.ts +0 -7
  49. package/dist/types/buttons/MRT_ExpandButton.d.ts +0 -8
  50. package/dist/types/buttons/MRT_GrabHandleButton.d.ts +0 -12
  51. package/dist/types/buttons/MRT_RowPinButton.d.ts +0 -10
  52. package/dist/types/buttons/MRT_ShowHideColumnsButton.d.ts +0 -7
  53. package/dist/types/buttons/MRT_ToggleDensePaddingButton.d.ts +0 -7
  54. package/dist/types/buttons/MRT_ToggleFiltersButton.d.ts +0 -7
  55. package/dist/types/buttons/MRT_ToggleFullScreenButton.d.ts +0 -7
  56. package/dist/types/buttons/MRT_ToggleGlobalFilterButton.d.ts +0 -7
  57. package/dist/types/buttons/MRT_ToggleRowActionMenuButton.d.ts +0 -9
  58. package/dist/types/buttons/index.d.ts +0 -13
  59. package/dist/types/column.utils.d.ts +0 -127
  60. package/dist/types/filterFns.d.ts +0 -69
  61. package/dist/types/footer/MRT_TableFooter.d.ts +0 -11
  62. package/dist/types/footer/MRT_TableFooterCell.d.ts +0 -8
  63. package/dist/types/footer/MRT_TableFooterRow.d.ts +0 -12
  64. package/dist/types/footer/index.d.ts +0 -3
  65. package/dist/types/head/MRT_TableHead.d.ts +0 -11
  66. package/dist/types/head/MRT_TableHeadCell.d.ts +0 -8
  67. package/dist/types/head/MRT_TableHeadCellColumnActionsButton.d.ts +0 -8
  68. package/dist/types/head/MRT_TableHeadCellFilterContainer.d.ts +0 -8
  69. package/dist/types/head/MRT_TableHeadCellFilterLabel.d.ts +0 -8
  70. package/dist/types/head/MRT_TableHeadCellGrabHandle.d.ts +0 -10
  71. package/dist/types/head/MRT_TableHeadCellResizeHandle.d.ts +0 -8
  72. package/dist/types/head/MRT_TableHeadCellSortLabel.d.ts +0 -8
  73. package/dist/types/head/MRT_TableHeadRow.d.ts +0 -12
  74. package/dist/types/head/index.d.ts +0 -9
  75. package/dist/types/hooks/index.d.ts +0 -4
  76. package/dist/types/hooks/useMRT_DisplayColumns.d.ts +0 -9
  77. package/dist/types/hooks/useMRT_Effects.d.ts +0 -2
  78. package/dist/types/hooks/useMRT_TableInstance.d.ts +0 -2
  79. package/dist/types/hooks/useMRT_TableOptions.d.ts +0 -22
  80. package/dist/types/icons.d.ts +0 -36
  81. package/dist/types/index.d.ts +0 -18
  82. package/dist/types/inputs/MRT_EditCellTextField.d.ts +0 -8
  83. package/dist/types/inputs/MRT_FilterCheckbox.d.ts +0 -8
  84. package/dist/types/inputs/MRT_FilterRangeFields.d.ts +0 -8
  85. package/dist/types/inputs/MRT_FilterRangeSlider.d.ts +0 -8
  86. package/dist/types/inputs/MRT_FilterTextField.d.ts +0 -9
  87. package/dist/types/inputs/MRT_GlobalFilterTextField.d.ts +0 -7
  88. package/dist/types/inputs/MRT_SelectCheckbox.d.ts +0 -9
  89. package/dist/types/inputs/index.d.ts +0 -7
  90. package/dist/types/locales/am.d.ts +0 -2
  91. package/dist/types/locales/ar.d.ts +0 -2
  92. package/dist/types/locales/az.d.ts +0 -2
  93. package/dist/types/locales/bg.d.ts +0 -2
  94. package/dist/types/locales/cs.d.ts +0 -2
  95. package/dist/types/locales/da.d.ts +0 -2
  96. package/dist/types/locales/de.d.ts +0 -2
  97. package/dist/types/locales/en.d.ts +0 -2
  98. package/dist/types/locales/es.d.ts +0 -2
  99. package/dist/types/locales/et.d.ts +0 -2
  100. package/dist/types/locales/fa.d.ts +0 -2
  101. package/dist/types/locales/fi.d.ts +0 -2
  102. package/dist/types/locales/fr.d.ts +0 -2
  103. package/dist/types/locales/hu.d.ts +0 -2
  104. package/dist/types/locales/hy.d.ts +0 -2
  105. package/dist/types/locales/id.d.ts +0 -2
  106. package/dist/types/locales/it.d.ts +0 -2
  107. package/dist/types/locales/ja.d.ts +0 -2
  108. package/dist/types/locales/ko.d.ts +0 -2
  109. package/dist/types/locales/nl.d.ts +0 -2
  110. package/dist/types/locales/no.d.ts +0 -2
  111. package/dist/types/locales/np.d.ts +0 -2
  112. package/dist/types/locales/pl.d.ts +0 -2
  113. package/dist/types/locales/pt-BR.d.ts +0 -2
  114. package/dist/types/locales/pt.d.ts +0 -2
  115. package/dist/types/locales/ro.d.ts +0 -2
  116. package/dist/types/locales/ru.d.ts +0 -2
  117. package/dist/types/locales/sk.d.ts +0 -2
  118. package/dist/types/locales/sr-Cyrl-RS.d.ts +0 -2
  119. package/dist/types/locales/sr-Latn-RS.d.ts +0 -2
  120. package/dist/types/locales/sv.d.ts +0 -2
  121. package/dist/types/locales/tr.d.ts +0 -2
  122. package/dist/types/locales/uk.d.ts +0 -2
  123. package/dist/types/locales/vi.d.ts +0 -2
  124. package/dist/types/locales/zh-Hans.d.ts +0 -2
  125. package/dist/types/locales/zh-Hant.d.ts +0 -2
  126. package/dist/types/menus/MRT_ColumnActionMenu.d.ts +0 -20
  127. package/dist/types/menus/MRT_FilterOptionMenu.d.ts +0 -13
  128. package/dist/types/menus/MRT_RowActionMenu.d.ts +0 -12
  129. package/dist/types/menus/MRT_ShowHideColumnsMenu.d.ts +0 -10
  130. package/dist/types/menus/MRT_ShowHideColumnsMenuItems.d.ts +0 -12
  131. package/dist/types/menus/index.d.ts +0 -5
  132. package/dist/types/modals/MRT_EditRowModal.d.ts +0 -8
  133. package/dist/types/modals/index.d.ts +0 -1
  134. package/dist/types/sortingFns.d.ts +0 -12
  135. package/dist/types/style.utils.d.ts +0 -32
  136. package/dist/types/table/MRT_Table.d.ts +0 -7
  137. package/dist/types/table/MRT_TableContainer.d.ts +0 -7
  138. package/dist/types/table/MRT_TableLoadingOverlay.d.ts +0 -7
  139. package/dist/types/table/MRT_TablePaper.d.ts +0 -7
  140. package/dist/types/table/index.d.ts +0 -5
  141. package/dist/types/toolbar/MRT_BottomToolbar.d.ts +0 -7
  142. package/dist/types/toolbar/MRT_LinearProgressBar.d.ts +0 -8
  143. package/dist/types/toolbar/MRT_TablePagination.d.ts +0 -14
  144. package/dist/types/toolbar/MRT_ToolbarAlertBanner.d.ts +0 -8
  145. package/dist/types/toolbar/MRT_ToolbarDropZone.d.ts +0 -7
  146. package/dist/types/toolbar/MRT_ToolbarInternalButtons.d.ts +0 -7
  147. package/dist/types/toolbar/MRT_TopToolbar.d.ts +0 -6
  148. package/dist/types/toolbar/index.d.ts +0 -7
  149. package/dist/types/types.d.ts +0 -854
  150. package/dist/types/useMaterialReactTable.d.ts +0 -2
@@ -1,854 +0,0 @@
1
- import { type CSSProperties, type Dispatch, type MutableRefObject, type ReactNode, type RefObject, type SetStateAction } from 'react';
2
- import { type AccessorFn, type AggregationFn, type Cell, type Column, type ColumnDef, type ColumnFiltersState, type ColumnOrderState, type ColumnPinningState, type ColumnSizingInfoState, type ColumnSizingState, type DeepKeys, type DeepValue, type ExpandedState, type FilterFn, type GroupingState, type Header, type HeaderGroup, type OnChangeFn, type PaginationState, type Row, type RowSelectionState, type SortingFn, type SortingState, type Table, type TableOptions, type TableState, type Updater, type VisibilityState } from '@tanstack/react-table';
3
- import { type VirtualItem, type Virtualizer, type VirtualizerOptions } from '@tanstack/react-virtual';
4
- import { type AlertProps } from '@mui/material/Alert';
5
- import { type AutocompleteProps } from '@mui/material/Autocomplete';
6
- import { type BoxProps } from '@mui/material/Box';
7
- import { type ButtonProps } from '@mui/material/Button';
8
- import { type CheckboxProps } from '@mui/material/Checkbox';
9
- import { type ChipProps } from '@mui/material/Chip';
10
- import { type CircularProgressProps } from '@mui/material/CircularProgress';
11
- import { type DialogProps } from '@mui/material/Dialog';
12
- import { type IconButtonProps } from '@mui/material/IconButton';
13
- import { type LinearProgressProps } from '@mui/material/LinearProgress';
14
- import { type PaginationProps } from '@mui/material/Pagination';
15
- import { type PaperProps } from '@mui/material/Paper';
16
- import { type RadioProps } from '@mui/material/Radio';
17
- import { type SelectProps } from '@mui/material/Select';
18
- import { type SkeletonProps } from '@mui/material/Skeleton';
19
- import { type SliderProps } from '@mui/material/Slider';
20
- import { type TableProps } from '@mui/material/Table';
21
- import { type TableBodyProps } from '@mui/material/TableBody';
22
- import { type TableCellProps } from '@mui/material/TableCell';
23
- import { type TableContainerProps } from '@mui/material/TableContainer';
24
- import { type TableFooterProps } from '@mui/material/TableFooter';
25
- import { type TableHeadProps } from '@mui/material/TableHead';
26
- import { type TableRowProps } from '@mui/material/TableRow';
27
- import { type TextFieldProps } from '@mui/material/TextField';
28
- import { type Theme } from '@mui/material/styles';
29
- import { type DatePickerProps } from '@mui/x-date-pickers';
30
- import { type MRT_AggregationFns } from './aggregationFns';
31
- import { type MRT_FilterFns } from './filterFns';
32
- import { type MRT_Icons } from './icons';
33
- import { type MRT_SortingFns } from './sortingFns';
34
- export type { MRT_Icons };
35
- export type LiteralUnion<T extends U, U = string> = T | (U & Record<never, never>);
36
- export type Prettify<T> = {
37
- [K in keyof T]: T[K];
38
- } & unknown;
39
- export type Xor<A, B> = Prettify<A & {
40
- [k in keyof B]?: never;
41
- }> | Prettify<B & {
42
- [k in keyof A]?: never;
43
- }>;
44
- export type MRT_DensityState = 'comfortable' | 'compact' | 'spacious';
45
- export type MRT_ColumnFilterFnsState = Record<string, MRT_FilterOption>;
46
- export type MRT_RowData = Record<string, any>;
47
- export type { ColumnFiltersState as MRT_ColumnFiltersState, ColumnOrderState as MRT_ColumnOrderState, ColumnPinningState as MRT_ColumnPinningState, ColumnSizingInfoState as MRT_ColumnSizingInfoState, ColumnSizingState as MRT_ColumnSizingState, ExpandedState as MRT_ExpandedState, GroupingState as MRT_GroupingState, PaginationState as MRT_PaginationState, RowSelectionState as MRT_RowSelectionState, SortingState as MRT_SortingState, Updater as MRT_Updater, VirtualItem as MRT_VirtualItem, Virtualizer as MRT_Virtualizer, VirtualizerOptions as MRT_VirtualizerOptions, VisibilityState as MRT_VisibilityState, };
48
- export type MRT_ColumnHelper<TData extends MRT_RowData> = {
49
- accessor: <TAccessor extends AccessorFn<TData> | DeepKeys<TData>, TValue extends TAccessor extends AccessorFn<TData, infer TReturn> ? TReturn : TAccessor extends DeepKeys<TData> ? DeepValue<TData, TAccessor> : never>(accessor: TAccessor, column: MRT_DisplayColumnDef<TData, TValue>) => MRT_ColumnDef<TData, TValue>;
50
- display: (column: MRT_DisplayColumnDef<TData>) => MRT_ColumnDef<TData>;
51
- group: (column: MRT_GroupColumnDef<TData>) => MRT_ColumnDef<TData>;
52
- };
53
- export interface MRT_Localization {
54
- actions: string;
55
- and: string;
56
- cancel: string;
57
- changeFilterMode: string;
58
- changeSearchMode: string;
59
- clearFilter: string;
60
- clearSearch: string;
61
- clearSort: string;
62
- clickToCopy: string;
63
- collapse: string;
64
- collapseAll: string;
65
- columnActions: string;
66
- copiedToClipboard: string;
67
- dropToGroupBy: string;
68
- edit: string;
69
- expand: string;
70
- expandAll: string;
71
- filterArrIncludes: string;
72
- filterArrIncludesAll: string;
73
- filterArrIncludesSome: string;
74
- filterBetween: string;
75
- filterBetweenInclusive: string;
76
- filterByColumn: string;
77
- filterContains: string;
78
- filterEmpty: string;
79
- filterEndsWith: string;
80
- filterEquals: string;
81
- filterEqualsString: string;
82
- filterFuzzy: string;
83
- filterGreaterThan: string;
84
- filterGreaterThanOrEqualTo: string;
85
- filterInNumberRange: string;
86
- filterIncludesString: string;
87
- filterIncludesStringSensitive: string;
88
- filterLessThan: string;
89
- filterLessThanOrEqualTo: string;
90
- filterMode: string;
91
- filterNotEmpty: string;
92
- filterNotEquals: string;
93
- filterStartsWith: string;
94
- filterWeakEquals: string;
95
- filteringByColumn: string;
96
- goToFirstPage: string;
97
- goToLastPage: string;
98
- goToNextPage: string;
99
- goToPreviousPage: string;
100
- grab: string;
101
- groupByColumn: string;
102
- groupedBy: string;
103
- hideAll: string;
104
- hideColumn: string;
105
- max: string;
106
- min: string;
107
- move: string;
108
- noRecordsToDisplay: string;
109
- noResultsFound: string;
110
- of: string;
111
- or: string;
112
- pin: string;
113
- pinToLeft: string;
114
- pinToRight: string;
115
- resetColumnSize: string;
116
- resetOrder: string;
117
- rowActions: string;
118
- rowNumber: string;
119
- rowNumbers: string;
120
- rowsPerPage: string;
121
- save: string;
122
- search: string;
123
- select: string;
124
- selectedCountOfRowCountRowsSelected: string;
125
- showAll: string;
126
- showAllColumns: string;
127
- showHideColumns: string;
128
- showHideFilters: string;
129
- showHideSearch: string;
130
- sortByColumnAsc: string;
131
- sortByColumnDesc: string;
132
- sortedByColumnAsc: string;
133
- sortedByColumnDesc: string;
134
- thenBy: string;
135
- toggleDensity: string;
136
- toggleFullScreen: string;
137
- toggleSelectAll: string;
138
- toggleSelectRow: string;
139
- toggleVisibility: string;
140
- ungroupByColumn: string;
141
- unpin: string;
142
- unpinAll: string;
143
- }
144
- export interface MRT_Theme {
145
- baseBackgroundColor?: CSSProperties['backgroundColor'];
146
- draggingBorderColor?: CSSProperties['borderColor'];
147
- matchHighlightColor?: CSSProperties['backgroundColor'];
148
- pinnedRowBackgroundColor?: CSSProperties['backgroundColor'];
149
- selectedRowBackgroundColor?: CSSProperties['backgroundColor'];
150
- }
151
- export interface MRT_RowModel<TData extends MRT_RowData> {
152
- flatRows: MRT_Row<TData>[];
153
- rows: MRT_Row<TData>[];
154
- rowsById: {
155
- [key: string]: MRT_Row<TData>;
156
- };
157
- }
158
- export type MRT_TableInstance<TData extends MRT_RowData> = Omit<Table<TData>, 'getAllColumns' | 'getAllFlatColumns' | 'getAllLeafColumns' | 'getBottomRows' | 'getCenterLeafColumns' | 'getCenterRows' | 'getColumn' | 'getExpandedRowModel' | 'getFlatHeaders' | 'getHeaderGroups' | 'getLeafHeaders' | 'getLeftLeafColumns' | 'getPaginationRowModel' | 'getPreFilteredRowModel' | 'getPrePaginationRowModel' | 'getRightLeafColumns' | 'getRowModel' | 'getSelectedRowModel' | 'getState' | 'getTopRows' | 'options'> & {
159
- getAllColumns: () => MRT_Column<TData>[];
160
- getAllFlatColumns: () => MRT_Column<TData>[];
161
- getAllLeafColumns: () => MRT_Column<TData>[];
162
- getBottomRows: () => MRT_Row<TData>[];
163
- getCenterLeafColumns: () => MRT_Column<TData>[];
164
- getCenterRows: () => MRT_Row<TData>[];
165
- getColumn: (columnId: string) => MRT_Column<TData>;
166
- getExpandedRowModel: () => MRT_RowModel<TData>;
167
- getFlatHeaders: () => MRT_Header<TData>[];
168
- getHeaderGroups: () => MRT_HeaderGroup<TData>[];
169
- getLeafHeaders: () => MRT_Header<TData>[];
170
- getLeftLeafColumns: () => MRT_Column<TData>[];
171
- getPaginationRowModel: () => MRT_RowModel<TData>;
172
- getPreFilteredRowModel: () => MRT_RowModel<TData>;
173
- getPrePaginationRowModel: () => MRT_RowModel<TData>;
174
- getRightLeafColumns: () => MRT_Column<TData>[];
175
- getRowModel: () => MRT_RowModel<TData>;
176
- getSelectedRowModel: () => MRT_RowModel<TData>;
177
- getState: () => MRT_TableState<TData>;
178
- getTopRows: () => MRT_Row<TData>[];
179
- options: MRT_DefinedTableOptions<TData>;
180
- refs: {
181
- bottomToolbarRef: MutableRefObject<HTMLDivElement>;
182
- editInputRefs: MutableRefObject<Record<string, HTMLInputElement>>;
183
- filterInputRefs: MutableRefObject<Record<string, HTMLInputElement>>;
184
- searchInputRef: MutableRefObject<HTMLInputElement>;
185
- tableContainerRef: MutableRefObject<HTMLDivElement>;
186
- tableFooterRef: MutableRefObject<HTMLTableSectionElement>;
187
- tableHeadCellRefs: MutableRefObject<Record<string, HTMLTableCellElement>>;
188
- tableHeadRef: MutableRefObject<HTMLTableSectionElement>;
189
- tablePaperRef: MutableRefObject<HTMLDivElement>;
190
- topToolbarRef: MutableRefObject<HTMLDivElement>;
191
- };
192
- setColumnFilterFns: Dispatch<SetStateAction<MRT_ColumnFilterFnsState>>;
193
- setCreatingRow: Dispatch<SetStateAction<MRT_Row<TData> | null | true>>;
194
- setDensity: Dispatch<SetStateAction<MRT_DensityState>>;
195
- setDraggingColumn: Dispatch<SetStateAction<MRT_Column<TData> | null>>;
196
- setDraggingRow: Dispatch<SetStateAction<MRT_Row<TData> | null>>;
197
- setEditingCell: Dispatch<SetStateAction<MRT_Cell<TData> | null>>;
198
- setEditingRow: Dispatch<SetStateAction<MRT_Row<TData> | null>>;
199
- setGlobalFilterFn: Dispatch<SetStateAction<MRT_FilterOption>>;
200
- setHoveredColumn: Dispatch<SetStateAction<Partial<MRT_Column<TData>> | null>>;
201
- setHoveredRow: Dispatch<SetStateAction<Partial<MRT_Row<TData>> | null>>;
202
- setIsFullScreen: Dispatch<SetStateAction<boolean>>;
203
- setShowAlertBanner: Dispatch<SetStateAction<boolean>>;
204
- setShowColumnFilters: Dispatch<SetStateAction<boolean>>;
205
- setShowGlobalFilter: Dispatch<SetStateAction<boolean>>;
206
- setShowToolbarDropZone: Dispatch<SetStateAction<boolean>>;
207
- };
208
- export type MRT_DefinedTableOptions<TData extends MRT_RowData> = MRT_TableOptions<TData> & {
209
- icons: MRT_Icons;
210
- localization: MRT_Localization;
211
- };
212
- export type MRT_TableState<TData extends MRT_RowData> = TableState & {
213
- columnFilterFns: MRT_ColumnFilterFnsState;
214
- creatingRow: MRT_Row<TData> | null;
215
- density: MRT_DensityState;
216
- draggingColumn: MRT_Column<TData> | null;
217
- draggingRow: MRT_Row<TData> | null;
218
- editingCell: MRT_Cell<TData> | null;
219
- editingRow: MRT_Row<TData> | null;
220
- globalFilterFn: MRT_FilterOption;
221
- hoveredColumn: Partial<MRT_Column<TData>> | null;
222
- hoveredRow: Partial<MRT_Row<TData>> | null;
223
- isFullScreen: boolean;
224
- isLoading: boolean;
225
- isSaving: boolean;
226
- showAlertBanner: boolean;
227
- showColumnFilters: boolean;
228
- showGlobalFilter: boolean;
229
- showLoadingOverlay: boolean;
230
- showProgressBars: boolean;
231
- showSkeletons: boolean;
232
- showToolbarDropZone: boolean;
233
- };
234
- export type MRT_ColumnDef<TData extends MRT_RowData, TValue = unknown> = Omit<ColumnDef<TData, TValue>, 'accessorKey' | 'aggregatedCell' | 'aggregationFn' | 'cell' | 'columns' | 'filterFn' | 'footer' | 'header' | 'id' | 'sortingFn'> & {
235
- AggregatedCell?: (props: {
236
- cell: MRT_Cell<TData, TValue>;
237
- column: MRT_Column<TData, TValue>;
238
- row: MRT_Row<TData>;
239
- table: MRT_TableInstance<TData>;
240
- }) => ReactNode;
241
- Cell?: (props: {
242
- cell: MRT_Cell<TData, TValue>;
243
- column: MRT_Column<TData, TValue>;
244
- renderedCellValue: ReactNode;
245
- row: MRT_Row<TData>;
246
- rowRef?: RefObject<HTMLTableRowElement>;
247
- table: MRT_TableInstance<TData>;
248
- }) => ReactNode;
249
- Edit?: (props: {
250
- cell: MRT_Cell<TData, TValue>;
251
- column: MRT_Column<TData, TValue>;
252
- row: MRT_Row<TData>;
253
- table: MRT_TableInstance<TData>;
254
- }) => ReactNode;
255
- Filter?: (props: {
256
- column: MRT_Column<TData, TValue>;
257
- header: MRT_Header<TData>;
258
- rangeFilterIndex?: number;
259
- table: MRT_TableInstance<TData>;
260
- }) => ReactNode;
261
- Footer?: ((props: {
262
- column: MRT_Column<TData, TValue>;
263
- footer: MRT_Header<TData>;
264
- table: MRT_TableInstance<TData>;
265
- }) => ReactNode) | ReactNode;
266
- GroupedCell?: (props: {
267
- cell: MRT_Cell<TData, TValue>;
268
- column: MRT_Column<TData, TValue>;
269
- row: MRT_Row<TData>;
270
- table: MRT_TableInstance<TData>;
271
- }) => ReactNode;
272
- Header?: ((props: {
273
- column: MRT_Column<TData, TValue>;
274
- header: MRT_Header<TData>;
275
- table: MRT_TableInstance<TData>;
276
- }) => ReactNode) | ReactNode;
277
- PlaceholderCell?: (props: {
278
- cell: MRT_Cell<TData, TValue>;
279
- column: MRT_Column<TData, TValue>;
280
- row: MRT_Row<TData>;
281
- table: MRT_TableInstance<TData>;
282
- }) => ReactNode;
283
- /**
284
- * Either an `accessorKey` or a combination of an `accessorFn` and `id` are required for a data column definition.
285
- * Specify a function here to point to the correct property in the data object.
286
- *
287
- * @example accessorFn: (row) => row.username
288
- */
289
- accessorFn?: (originalRow: TData) => TValue;
290
- /**
291
- * Either an `accessorKey` or a combination of an `accessorFn` and `id` are required for a data column definition.
292
- * Specify which key in the row this column should use to access the correct data.
293
- * Also supports Deep Key Dot Notation.
294
- *
295
- * @example accessorKey: 'username' //simple
296
- * @example accessorKey: 'name.firstName' //deep key dot notation
297
- */
298
- accessorKey?: DeepKeys<TData> | (string & {});
299
- aggregationFn?: Array<MRT_AggregationFn<TData>> | MRT_AggregationFn<TData>;
300
- /**
301
- * Specify what type of column this is. Either `data`, `display`, or `group`. Defaults to `data`.
302
- * Leave this blank if you are just creating a normal data column.
303
- *
304
- * @default 'data'
305
- *
306
- * @example columnDefType: 'display'
307
- */
308
- columnDefType?: 'data' | 'display' | 'group';
309
- columnFilterModeOptions?: Array<LiteralUnion<string & MRT_FilterOption>> | null;
310
- columns?: MRT_ColumnDef<TData, TValue>[];
311
- editSelectOptions?: ({
312
- label?: string;
313
- /**
314
- * @deprecated use `label` instead
315
- */
316
- text?: string;
317
- value: any;
318
- } | string)[];
319
- editVariant?: 'select' | 'text';
320
- enableClickToCopy?: boolean;
321
- enableColumnActions?: boolean;
322
- enableColumnDragging?: boolean;
323
- enableColumnFilterModes?: boolean;
324
- enableColumnOrdering?: boolean;
325
- enableEditing?: ((row: MRT_Row<TData>) => boolean) | boolean;
326
- enableFilterMatchHighlighting?: boolean;
327
- filterFn?: MRT_FilterFn<TData>;
328
- filterSelectOptions?: ({
329
- label?: string;
330
- /**
331
- * @deprecated use `label` instead
332
- */
333
- text?: string;
334
- value: any;
335
- } | string)[];
336
- filterVariant?: 'autocomplete' | 'checkbox' | 'date' | 'date-range' | 'multi-select' | 'range' | 'range-slider' | 'select' | 'text';
337
- /**
338
- * footer must be a string. If you want custom JSX to render the footer, you can also specify a `Footer` option. (Capital F)
339
- */
340
- footer?: string;
341
- /**
342
- * header must be a string. If you want custom JSX to render the header, you can also specify a `Header` option. (Capital H)
343
- */
344
- header: string;
345
- /**
346
- * Either an `accessorKey` or a combination of an `accessorFn` and `id` are required for a data column definition.
347
- *
348
- * If you have also specified an `accessorFn`, MRT still needs to have a valid `id` to be able to identify the column uniquely.
349
- *
350
- * `id` defaults to the `accessorKey` or `header` if not specified.
351
- *
352
- * @default gets set to the same value as `accessorKey` by default
353
- */
354
- id?: LiteralUnion<string & keyof TData>;
355
- muiColumnActionsButtonProps?: ((props: {
356
- column: MRT_Column<TData>;
357
- table: MRT_TableInstance<TData>;
358
- }) => IconButtonProps) | IconButtonProps;
359
- muiColumnDragHandleProps?: ((props: {
360
- column: MRT_Column<TData>;
361
- table: MRT_TableInstance<TData>;
362
- }) => IconButtonProps) | IconButtonProps;
363
- muiCopyButtonProps?: ((props: {
364
- cell: MRT_Cell<TData, TValue>;
365
- column: MRT_Column<TData>;
366
- row: MRT_Row<TData>;
367
- table: MRT_TableInstance<TData>;
368
- }) => ButtonProps) | ButtonProps;
369
- muiEditTextFieldProps?: ((props: {
370
- cell: MRT_Cell<TData, TValue>;
371
- column: MRT_Column<TData>;
372
- row: MRT_Row<TData>;
373
- table: MRT_TableInstance<TData>;
374
- }) => TextFieldProps) | TextFieldProps;
375
- muiFilterAutocompleteProps?: ((props: {
376
- column: MRT_Column<TData>;
377
- table: MRT_TableInstance<TData>;
378
- }) => AutocompleteProps<any, any, any, any>) | AutocompleteProps<any, any, any, any>;
379
- muiFilterCheckboxProps?: ((props: {
380
- column: MRT_Column<TData>;
381
- table: MRT_TableInstance<TData>;
382
- }) => CheckboxProps) | CheckboxProps;
383
- muiFilterDatePickerProps?: ((props: {
384
- column: MRT_Column<TData>;
385
- rangeFilterIndex?: number;
386
- table: MRT_TableInstance<TData>;
387
- }) => DatePickerProps<any>) | DatePickerProps<any>;
388
- muiFilterSliderProps?: ((props: {
389
- column: MRT_Column<TData>;
390
- table: MRT_TableInstance<TData>;
391
- }) => SliderProps) | SliderProps;
392
- muiFilterTextFieldProps?: ((props: {
393
- column: MRT_Column<TData>;
394
- rangeFilterIndex?: number;
395
- table: MRT_TableInstance<TData>;
396
- }) => TextFieldProps) | TextFieldProps;
397
- muiTableBodyCellProps?: ((props: {
398
- cell: MRT_Cell<TData, TValue>;
399
- column: MRT_Column<TData>;
400
- row: MRT_Row<TData>;
401
- table: MRT_TableInstance<TData>;
402
- }) => TableCellProps) | TableCellProps;
403
- muiTableFooterCellProps?: ((props: {
404
- column: MRT_Column<TData>;
405
- table: MRT_TableInstance<TData>;
406
- }) => TableCellProps) | TableCellProps;
407
- muiTableHeadCellProps?: ((props: {
408
- column: MRT_Column<TData>;
409
- table: MRT_TableInstance<TData>;
410
- }) => TableCellProps) | TableCellProps;
411
- renderColumnActionsMenuItems?: (props: {
412
- closeMenu: () => void;
413
- column: MRT_Column<TData>;
414
- internalColumnMenuItems: ReactNode[];
415
- table: MRT_TableInstance<TData>;
416
- }) => ReactNode[];
417
- renderColumnFilterModeMenuItems?: (props: {
418
- column: MRT_Column<TData>;
419
- internalFilterOptions: MRT_InternalFilterOption[];
420
- onSelectFilterMode: (filterMode: MRT_FilterOption) => void;
421
- table: MRT_TableInstance<TData>;
422
- }) => ReactNode[];
423
- sortingFn?: MRT_SortingFn<TData>;
424
- };
425
- export type MRT_DisplayColumnDef<TData extends MRT_RowData, TValue = unknown> = Omit<MRT_ColumnDef<TData, TValue>, 'accessorFn' | 'accessorKey'>;
426
- export type MRT_GroupColumnDef<TData extends MRT_RowData> = MRT_DisplayColumnDef<TData, any> & {
427
- columns: MRT_ColumnDef<TData>[];
428
- };
429
- export type MRT_DefinedColumnDef<TData extends MRT_RowData, TValue = unknown> = Omit<MRT_ColumnDef<TData, TValue>, 'defaultDisplayColumn' | 'id'> & {
430
- _filterFn: MRT_FilterOption;
431
- defaultDisplayColumn: Partial<MRT_ColumnDef<TData, TValue>>;
432
- id: string;
433
- };
434
- export type MRT_Column<TData extends MRT_RowData, TValue = unknown> = Omit<Column<TData, TValue>, 'columnDef' | 'columns' | 'filterFn' | 'footer' | 'header'> & {
435
- columnDef: MRT_DefinedColumnDef<TData, TValue>;
436
- columns?: MRT_Column<TData, TValue>[];
437
- filterFn?: MRT_FilterFn<TData>;
438
- footer: string;
439
- header: string;
440
- };
441
- export type MRT_Header<TData extends MRT_RowData> = Omit<Header<TData, unknown>, 'column'> & {
442
- column: MRT_Column<TData>;
443
- };
444
- export type MRT_HeaderGroup<TData extends MRT_RowData> = Omit<HeaderGroup<TData>, 'headers'> & {
445
- headers: MRT_Header<TData>[];
446
- };
447
- export type MRT_Row<TData extends MRT_RowData> = Omit<Row<TData>, '_valuesCache' | 'getAllCells' | 'getVisibleCells' | 'subRows'> & {
448
- _valuesCache: Record<LiteralUnion<string & DeepKeys<TData>>, any>;
449
- getAllCells: () => MRT_Cell<TData>[];
450
- getVisibleCells: () => MRT_Cell<TData>[];
451
- subRows?: MRT_Row<TData>[];
452
- };
453
- export type MRT_Cell<TData extends MRT_RowData, TValue = unknown> = Omit<Cell<TData, TValue>, 'column' | 'row'> & {
454
- column: MRT_Column<TData, TValue>;
455
- row: MRT_Row<TData>;
456
- };
457
- export type MRT_AggregationOption = string & keyof typeof MRT_AggregationFns;
458
- export type MRT_AggregationFn<TData extends MRT_RowData> = AggregationFn<TData> | MRT_AggregationOption;
459
- export type MRT_SortingOption = LiteralUnion<string & keyof typeof MRT_SortingFns>;
460
- export type MRT_SortingFn<TData extends MRT_RowData> = MRT_SortingOption | SortingFn<TData>;
461
- export type MRT_FilterOption = LiteralUnion<string & keyof typeof MRT_FilterFns>;
462
- export type MRT_FilterFn<TData extends MRT_RowData> = FilterFn<TData> | MRT_FilterOption;
463
- export type MRT_InternalFilterOption = {
464
- divider: boolean;
465
- label: string;
466
- option: string;
467
- symbol: string;
468
- };
469
- export type MRT_DisplayColumnIds = 'mrt-row-actions' | 'mrt-row-drag' | 'mrt-row-expand' | 'mrt-row-numbers' | 'mrt-row-pin' | 'mrt-row-select' | 'mrt-row-spacer';
470
- /**
471
- * `columns` and `data` props are the only required props, but there are over 170 other optional props.
472
- *
473
- * See more info on creating columns and data on the official docs site:
474
- * @link https://www.material-react-table.com/docs/getting-started/usage
475
- *
476
- * See the full props list on the official docs site:
477
- * @link https://www.material-react-table.com/docs/api/props
478
- */
479
- export type MRT_TableOptions<TData extends MRT_RowData> = Omit<Partial<TableOptions<TData>>, 'columns' | 'data' | 'defaultColumn' | 'enableRowSelection' | 'expandRowsFn' | 'getRowId' | 'globalFilterFn' | 'initialState' | 'onStateChange' | 'state'> & {
480
- columnFilterDisplayMode?: 'custom' | 'popover' | 'subheader';
481
- columnFilterModeOptions?: Array<LiteralUnion<string & MRT_FilterOption>> | null;
482
- columnVirtualizerInstanceRef?: MutableRefObject<Virtualizer<HTMLDivElement, HTMLTableCellElement> | null>;
483
- columnVirtualizerOptions?: ((props: {
484
- table: MRT_TableInstance<TData>;
485
- }) => Partial<VirtualizerOptions<HTMLDivElement, HTMLTableCellElement>>) | Partial<VirtualizerOptions<HTMLDivElement, HTMLTableCellElement>>;
486
- /**
487
- * The columns to display in the table. `accessorKey`s or `accessorFn`s must match keys in the `data` table option.
488
- *
489
- * See more info on creating columns on the official docs site:
490
- * @link https://www.material-react-table.com/docs/guides/data-columns
491
- * @link https://www.material-react-table.com/docs/guides/display-columns
492
- *
493
- * See all Columns Options on the official docs site:
494
- * @link https://www.material-react-table.com/docs/api/column-options
495
- */
496
- columns: MRT_ColumnDef<TData, any>[];
497
- createDisplayMode?: 'custom' | 'modal' | 'row';
498
- /**
499
- * Pass your data as an array of objects. Objects can theoretically be any shape, but it's best to keep them consistent.
500
- *
501
- * See the usage guide for more info on creating columns and data:
502
- * @link https://www.material-react-table.com/docs/getting-started/usage
503
- */
504
- data: TData[];
505
- /**
506
- * Instead of specifying a bunch of the same options for each column, you can just change an option in the `defaultColumn` table option to change a default option for all columns.
507
- */
508
- defaultColumn?: Partial<MRT_ColumnDef<TData>>;
509
- /**
510
- * Change the default options for display columns.
511
- */
512
- defaultDisplayColumn?: Partial<MRT_DisplayColumnDef<TData>>;
513
- displayColumnDefOptions?: Partial<{
514
- [key in MRT_DisplayColumnIds]: Partial<MRT_DisplayColumnDef<TData>>;
515
- }>;
516
- editDisplayMode?: 'cell' | 'custom' | 'modal' | 'row' | 'table';
517
- enableBottomToolbar?: boolean;
518
- enableClickToCopy?: boolean;
519
- enableColumnActions?: boolean;
520
- enableColumnDragging?: boolean;
521
- enableColumnFilterModes?: boolean;
522
- enableColumnOrdering?: boolean;
523
- enableColumnVirtualization?: boolean;
524
- enableDensityToggle?: boolean;
525
- enableEditing?: ((row: MRT_Row<TData>) => boolean) | boolean;
526
- enableExpandAll?: boolean;
527
- enableFacetedValues?: boolean;
528
- enableFilterMatchHighlighting?: boolean;
529
- enableFullScreenToggle?: boolean;
530
- enableGlobalFilterModes?: boolean;
531
- enableGlobalFilterRankedResults?: boolean;
532
- enablePagination?: boolean;
533
- enableRowActions?: boolean;
534
- enableRowDragging?: boolean;
535
- enableRowNumbers?: boolean;
536
- enableRowOrdering?: boolean;
537
- enableRowSelection?: ((row: MRT_Row<TData>) => boolean) | boolean;
538
- enableRowVirtualization?: boolean;
539
- enableSelectAll?: boolean;
540
- enableStickyFooter?: boolean;
541
- enableStickyHeader?: boolean;
542
- enableTableFooter?: boolean;
543
- enableTableHead?: boolean;
544
- enableToolbarInternalActions?: boolean;
545
- enableTopToolbar?: boolean;
546
- expandRowsFn?: (dataRow: TData) => TData[];
547
- getRowId?: (originalRow: TData, index: number, parentRow: MRT_Row<TData>) => string;
548
- globalFilterFn?: MRT_FilterOption;
549
- globalFilterModeOptions?: MRT_FilterOption[] | null;
550
- icons?: Partial<MRT_Icons>;
551
- initialState?: Partial<MRT_TableState<TData>>;
552
- /**
553
- * Changes which kind of CSS layout is used to render the table. `semantic` uses default semantic HTML elements, while `grid` adds CSS grid and flexbox styles
554
- */
555
- layoutMode?: 'grid' | 'grid-no-grow' | 'semantic';
556
- /**
557
- * Pass in either a locale imported from `material-react-table/locales/*` or a custom locale object.
558
- *
559
- * See the localization (i18n) guide for more info:
560
- * @link https://www.material-react-table.com/docs/guides/localization
561
- */
562
- localization?: Partial<MRT_Localization>;
563
- /**
564
- * Memoize cells, rows, or the entire table body to potentially improve render performance.
565
- *
566
- * @warning This will break some dynamic rendering features. See the memoization guide for more info:
567
- * @link https://www.material-react-table.com/docs/guides/memoize-components
568
- */
569
- memoMode?: 'cells' | 'rows' | 'table-body';
570
- mrtTheme?: ((theme: Theme) => MRT_Theme) | MRT_Theme;
571
- muiBottomToolbarProps?: ((props: {
572
- table: MRT_TableInstance<TData>;
573
- }) => BoxProps) | BoxProps;
574
- muiCircularProgressProps?: ((props: {
575
- table: MRT_TableInstance<TData>;
576
- }) => CircularProgressProps) | CircularProgressProps;
577
- muiColumnActionsButtonProps?: ((props: {
578
- column: MRT_Column<TData>;
579
- table: MRT_TableInstance<TData>;
580
- }) => IconButtonProps) | IconButtonProps;
581
- muiColumnDragHandleProps?: ((props: {
582
- column: MRT_Column<TData>;
583
- table: MRT_TableInstance<TData>;
584
- }) => IconButtonProps) | IconButtonProps;
585
- muiCopyButtonProps?: ((props: {
586
- cell: MRT_Cell<TData>;
587
- column: MRT_Column<TData>;
588
- row: MRT_Row<TData>;
589
- table: MRT_TableInstance<TData>;
590
- }) => ButtonProps) | ButtonProps;
591
- muiCreateRowModalProps?: ((props: {
592
- row: MRT_Row<TData>;
593
- table: MRT_TableInstance<TData>;
594
- }) => DialogProps) | DialogProps;
595
- muiDetailPanelProps?: ((props: {
596
- row: MRT_Row<TData>;
597
- table: MRT_TableInstance<TData>;
598
- }) => TableCellProps) | TableCellProps;
599
- muiEditRowDialogProps?: ((props: {
600
- row: MRT_Row<TData>;
601
- table: MRT_TableInstance<TData>;
602
- }) => DialogProps) | DialogProps;
603
- muiEditTextFieldProps?: ((props: {
604
- cell: MRT_Cell<TData>;
605
- column: MRT_Column<TData>;
606
- row: MRT_Row<TData>;
607
- table: MRT_TableInstance<TData>;
608
- }) => TextFieldProps) | TextFieldProps;
609
- muiExpandAllButtonProps?: ((props: {
610
- table: MRT_TableInstance<TData>;
611
- }) => IconButtonProps) | IconButtonProps;
612
- muiExpandButtonProps?: ((props: {
613
- row: MRT_Row<TData>;
614
- table: MRT_TableInstance<TData>;
615
- }) => IconButtonProps) | IconButtonProps;
616
- muiFilterAutocompleteProps?: ((props: {
617
- column: MRT_Column<TData>;
618
- table: MRT_TableInstance<TData>;
619
- }) => AutocompleteProps<any, any, any, any>) | AutocompleteProps<any, any, any, any>;
620
- muiFilterCheckboxProps?: ((props: {
621
- column: MRT_Column<TData>;
622
- table: MRT_TableInstance<TData>;
623
- }) => CheckboxProps) | CheckboxProps;
624
- muiFilterDatePickerProps?: ((props: {
625
- column: MRT_Column<TData>;
626
- rangeFilterIndex?: number;
627
- table: MRT_TableInstance<TData>;
628
- }) => DatePickerProps<any>) | DatePickerProps<any>;
629
- muiFilterSliderProps?: ((props: {
630
- column: MRT_Column<TData>;
631
- table: MRT_TableInstance<TData>;
632
- }) => SliderProps) | SliderProps;
633
- muiFilterTextFieldProps?: ((props: {
634
- column: MRT_Column<TData>;
635
- rangeFilterIndex?: number;
636
- table: MRT_TableInstance<TData>;
637
- }) => TextFieldProps) | TextFieldProps;
638
- muiLinearProgressProps?: ((props: {
639
- isTopToolbar: boolean;
640
- table: MRT_TableInstance<TData>;
641
- }) => LinearProgressProps) | LinearProgressProps;
642
- muiPaginationProps?: ((props: {
643
- table: MRT_TableInstance<TData>;
644
- }) => Partial<PaginationProps & {
645
- SelectProps?: Partial<SelectProps>;
646
- rowsPerPageOptions?: {
647
- label: string;
648
- value: number;
649
- }[] | number[];
650
- showRowsPerPage?: boolean;
651
- }>) | Partial<PaginationProps & {
652
- SelectProps?: Partial<SelectProps>;
653
- rowsPerPageOptions?: {
654
- label: string;
655
- value: number;
656
- }[] | number[];
657
- showRowsPerPage?: boolean;
658
- }>;
659
- muiRowDragHandleProps?: ((props: {
660
- row: MRT_Row<TData>;
661
- table: MRT_TableInstance<TData>;
662
- }) => IconButtonProps) | IconButtonProps;
663
- muiSearchTextFieldProps?: ((props: {
664
- table: MRT_TableInstance<TData>;
665
- }) => TextFieldProps) | TextFieldProps;
666
- muiSelectAllCheckboxProps?: ((props: {
667
- table: MRT_TableInstance<TData>;
668
- }) => CheckboxProps) | CheckboxProps;
669
- muiSelectCheckboxProps?: ((props: {
670
- row: MRT_Row<TData>;
671
- table: MRT_TableInstance<TData>;
672
- }) => CheckboxProps | RadioProps) | (CheckboxProps | RadioProps);
673
- muiSkeletonProps?: ((props: {
674
- cell: MRT_Cell<TData>;
675
- column: MRT_Column<TData>;
676
- row: MRT_Row<TData>;
677
- table: MRT_TableInstance<TData>;
678
- }) => SkeletonProps) | SkeletonProps;
679
- muiTableBodyCellProps?: ((props: {
680
- cell: MRT_Cell<TData>;
681
- column: MRT_Column<TData>;
682
- row: MRT_Row<TData>;
683
- table: MRT_TableInstance<TData>;
684
- }) => TableCellProps) | TableCellProps;
685
- muiTableBodyProps?: ((props: {
686
- table: MRT_TableInstance<TData>;
687
- }) => TableBodyProps) | TableBodyProps;
688
- muiTableBodyRowProps?: ((props: {
689
- isDetailPanel?: boolean;
690
- row: MRT_Row<TData>;
691
- staticRowIndex: number;
692
- table: MRT_TableInstance<TData>;
693
- }) => TableRowProps) | TableRowProps;
694
- muiTableContainerProps?: ((props: {
695
- table: MRT_TableInstance<TData>;
696
- }) => TableContainerProps) | TableContainerProps;
697
- muiTableFooterCellProps?: ((props: {
698
- column: MRT_Column<TData>;
699
- table: MRT_TableInstance<TData>;
700
- }) => TableCellProps) | TableCellProps;
701
- muiTableFooterProps?: ((props: {
702
- table: MRT_TableInstance<TData>;
703
- }) => TableFooterProps) | TableFooterProps;
704
- muiTableFooterRowProps?: ((props: {
705
- footerGroup: MRT_HeaderGroup<TData>;
706
- table: MRT_TableInstance<TData>;
707
- }) => TableRowProps) | TableRowProps;
708
- muiTableHeadCellProps?: ((props: {
709
- column: MRT_Column<TData>;
710
- table: MRT_TableInstance<TData>;
711
- }) => TableCellProps) | TableCellProps;
712
- muiTableHeadProps?: ((props: {
713
- table: MRT_TableInstance<TData>;
714
- }) => TableHeadProps) | TableHeadProps;
715
- muiTableHeadRowProps?: ((props: {
716
- headerGroup: MRT_HeaderGroup<TData>;
717
- table: MRT_TableInstance<TData>;
718
- }) => TableRowProps) | TableRowProps;
719
- muiTablePaperProps?: ((props: {
720
- table: MRT_TableInstance<TData>;
721
- }) => PaperProps) | PaperProps;
722
- muiTableProps?: ((props: {
723
- table: MRT_TableInstance<TData>;
724
- }) => TableProps) | TableProps;
725
- muiToolbarAlertBannerChipProps?: ((props: {
726
- table: MRT_TableInstance<TData>;
727
- }) => ChipProps) | ChipProps;
728
- muiToolbarAlertBannerProps?: ((props: {
729
- table: MRT_TableInstance<TData>;
730
- }) => AlertProps) | AlertProps;
731
- muiTopToolbarProps?: ((props: {
732
- table: MRT_TableInstance<TData>;
733
- }) => BoxProps) | BoxProps;
734
- onColumnFilterFnsChange?: OnChangeFn<{
735
- [key: string]: MRT_FilterOption;
736
- }>;
737
- onCreatingRowCancel?: (props: {
738
- row: MRT_Row<TData>;
739
- table: MRT_TableInstance<TData>;
740
- }) => void;
741
- onCreatingRowChange?: OnChangeFn<MRT_Row<TData> | null>;
742
- onCreatingRowSave?: (props: {
743
- exitCreatingMode: () => void;
744
- row: MRT_Row<TData>;
745
- table: MRT_TableInstance<TData>;
746
- values: Record<LiteralUnion<string & DeepKeys<TData>>, any>;
747
- }) => void;
748
- onDensityChange?: OnChangeFn<MRT_DensityState>;
749
- onDraggingColumnChange?: OnChangeFn<MRT_Column<TData> | null>;
750
- onDraggingRowChange?: OnChangeFn<MRT_Row<TData> | null>;
751
- onEditingCellChange?: OnChangeFn<MRT_Cell<TData> | null>;
752
- onEditingRowCancel?: (props: {
753
- row: MRT_Row<TData>;
754
- table: MRT_TableInstance<TData>;
755
- }) => void;
756
- onEditingRowChange?: OnChangeFn<MRT_Row<TData> | null>;
757
- onEditingRowSave?: (props: {
758
- exitEditingMode: () => void;
759
- row: MRT_Row<TData>;
760
- table: MRT_TableInstance<TData>;
761
- values: Record<LiteralUnion<string & DeepKeys<TData>>, any>;
762
- }) => Promise<void> | void;
763
- onGlobalFilterFnChange?: OnChangeFn<MRT_FilterOption>;
764
- onHoveredColumnChange?: OnChangeFn<Partial<MRT_Column<TData>> | null>;
765
- onHoveredRowChange?: OnChangeFn<Partial<MRT_Row<TData>> | null>;
766
- onIsFullScreenChange?: OnChangeFn<boolean>;
767
- onShowAlertBannerChange?: OnChangeFn<boolean>;
768
- onShowColumnFiltersChange?: OnChangeFn<boolean>;
769
- onShowGlobalFilterChange?: OnChangeFn<boolean>;
770
- onShowToolbarDropZoneChange?: OnChangeFn<boolean>;
771
- paginationDisplayMode?: 'custom' | 'default' | 'pages';
772
- positionActionsColumn?: 'first' | 'last';
773
- positionExpandColumn?: 'first' | 'last';
774
- positionGlobalFilter?: 'left' | 'none' | 'right';
775
- positionPagination?: 'both' | 'bottom' | 'none' | 'top';
776
- positionToolbarAlertBanner?: 'bottom' | 'head-overlay' | 'none' | 'top';
777
- positionToolbarDropZone?: 'both' | 'bottom' | 'none' | 'top';
778
- renderBottomToolbar?: ((props: {
779
- table: MRT_TableInstance<TData>;
780
- }) => ReactNode) | ReactNode;
781
- renderBottomToolbarCustomActions?: (props: {
782
- table: MRT_TableInstance<TData>;
783
- }) => ReactNode;
784
- renderColumnActionsMenuItems?: (props: {
785
- closeMenu: () => void;
786
- column: MRT_Column<TData>;
787
- internalColumnMenuItems: ReactNode[];
788
- table: MRT_TableInstance<TData>;
789
- }) => ReactNode[];
790
- renderColumnFilterModeMenuItems?: (props: {
791
- column: MRT_Column<TData>;
792
- internalFilterOptions: MRT_InternalFilterOption[];
793
- onSelectFilterMode: (filterMode: MRT_FilterOption) => void;
794
- table: MRT_TableInstance<TData>;
795
- }) => ReactNode[];
796
- renderCreateRowDialogContent?: (props: {
797
- internalEditComponents: ReactNode[];
798
- row: MRT_Row<TData>;
799
- table: MRT_TableInstance<TData>;
800
- }) => ReactNode;
801
- renderDetailPanel?: (props: {
802
- row: MRT_Row<TData>;
803
- table: MRT_TableInstance<TData>;
804
- }) => ReactNode;
805
- renderEditRowDialogContent?: (props: {
806
- internalEditComponents: ReactNode[];
807
- row: MRT_Row<TData>;
808
- table: MRT_TableInstance<TData>;
809
- }) => ReactNode;
810
- renderEmptyRowsFallback?: (props: {
811
- table: MRT_TableInstance<TData>;
812
- }) => ReactNode;
813
- renderGlobalFilterModeMenuItems?: (props: {
814
- internalFilterOptions: MRT_InternalFilterOption[];
815
- onSelectFilterMode: (filterMode: MRT_FilterOption) => void;
816
- table: MRT_TableInstance<TData>;
817
- }) => ReactNode[];
818
- renderRowActionMenuItems?: (props: {
819
- closeMenu: () => void;
820
- row: MRT_Row<TData>;
821
- table: MRT_TableInstance<TData>;
822
- }) => ReactNode[];
823
- renderRowActions?: (props: {
824
- cell: MRT_Cell<TData>;
825
- row: MRT_Row<TData>;
826
- table: MRT_TableInstance<TData>;
827
- }) => ReactNode;
828
- renderToolbarAlertBannerContent?: (props: {
829
- groupedAlert: ReactNode | null;
830
- selectedAlert: ReactNode | null;
831
- table: MRT_TableInstance<TData>;
832
- }) => ReactNode;
833
- renderToolbarInternalActions?: (props: {
834
- table: MRT_TableInstance<TData>;
835
- }) => ReactNode;
836
- renderTopToolbar?: ((props: {
837
- table: MRT_TableInstance<TData>;
838
- }) => ReactNode) | ReactNode;
839
- renderTopToolbarCustomActions?: (props: {
840
- table: MRT_TableInstance<TData>;
841
- }) => ReactNode;
842
- rowCount?: number;
843
- rowNumberDisplayMode?: 'original' | 'static';
844
- rowPinningDisplayMode?: 'bottom' | 'select-bottom' | 'select-sticky' | 'select-top' | 'sticky' | 'top' | 'top-and-bottom';
845
- rowVirtualizerInstanceRef?: MutableRefObject<Virtualizer<HTMLDivElement, HTMLTableRowElement> | null>;
846
- rowVirtualizerOptions?: ((props: {
847
- table: MRT_TableInstance<TData>;
848
- }) => Partial<VirtualizerOptions<HTMLDivElement, HTMLTableRowElement>>) | Partial<VirtualizerOptions<HTMLDivElement, HTMLTableRowElement>>;
849
- selectAllMode?: 'all' | 'page';
850
- /**
851
- * Manage state externally any way you want, then pass it back into MRT.
852
- */
853
- state?: Partial<MRT_TableState<TData>>;
854
- };