material-react-table 2.0.0-alpha.1 → 2.0.0-alpha.2

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.
Files changed (134) hide show
  1. package/README.md +2 -2
  2. package/dist/cjs/index.js +2400 -2365
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/types/MaterialReactTable.d.ts +1 -1
  5. package/dist/cjs/types/buttons/MRT_GrabHandleButton.d.ts +1 -1
  6. package/dist/cjs/types/buttons/MRT_RowPinButton.d.ts +2 -2
  7. package/dist/cjs/types/column.utils.d.ts +6 -6
  8. package/dist/cjs/types/filterFns.d.ts +14 -14
  9. package/dist/cjs/types/head/MRT_TableHeadCellFilterLabel.d.ts +1 -1
  10. package/dist/cjs/types/head/MRT_TableHeadCellSortLabel.d.ts +1 -1
  11. package/dist/cjs/types/hooks/useMRT_DisplayColumns.d.ts +3 -3
  12. package/dist/cjs/types/icons.d.ts +1 -1
  13. package/dist/cjs/types/inputs/MRT_FilterRangeSlider.d.ts +1 -1
  14. package/dist/cjs/types/menus/MRT_ColumnActionMenu.d.ts +4 -4
  15. package/dist/cjs/types/menus/MRT_ShowHideColumnsMenuItems.d.ts +1 -1
  16. package/dist/cjs/types/toolbar/MRT_TablePagination.d.ts +2 -2
  17. package/dist/cjs/types/toolbar/MRT_TopToolbar.d.ts +1 -1
  18. package/dist/cjs/types/types.d.ts +198 -198
  19. package/dist/esm/material-react-table.esm.js +2027 -1993
  20. package/dist/esm/material-react-table.esm.js.map +1 -1
  21. package/dist/esm/types/MaterialReactTable.d.ts +1 -1
  22. package/dist/esm/types/buttons/MRT_GrabHandleButton.d.ts +1 -1
  23. package/dist/esm/types/buttons/MRT_RowPinButton.d.ts +2 -2
  24. package/dist/esm/types/column.utils.d.ts +6 -6
  25. package/dist/esm/types/filterFns.d.ts +14 -14
  26. package/dist/esm/types/head/MRT_TableHeadCellFilterLabel.d.ts +1 -1
  27. package/dist/esm/types/head/MRT_TableHeadCellSortLabel.d.ts +1 -1
  28. package/dist/esm/types/hooks/useMRT_DisplayColumns.d.ts +3 -3
  29. package/dist/esm/types/icons.d.ts +1 -1
  30. package/dist/esm/types/inputs/MRT_FilterRangeSlider.d.ts +1 -1
  31. package/dist/esm/types/menus/MRT_ColumnActionMenu.d.ts +4 -4
  32. package/dist/esm/types/menus/MRT_ShowHideColumnsMenuItems.d.ts +1 -1
  33. package/dist/esm/types/toolbar/MRT_TablePagination.d.ts +2 -2
  34. package/dist/esm/types/toolbar/MRT_TopToolbar.d.ts +1 -1
  35. package/dist/esm/types/types.d.ts +198 -198
  36. package/dist/index.d.ts +239 -239
  37. package/locales/fr.esm.js +1 -1
  38. package/locales/fr.esm.js.map +1 -1
  39. package/locales/fr.js +1 -1
  40. package/locales/fr.js.map +1 -1
  41. package/locales/tr.d.ts +2 -0
  42. package/locales/tr.esm.d.ts +2 -0
  43. package/locales/tr.esm.js +93 -0
  44. package/locales/tr.esm.js.map +1 -0
  45. package/locales/tr.js +97 -0
  46. package/locales/tr.js.map +1 -0
  47. package/locales/uk.d.ts +2 -0
  48. package/locales/uk.esm.d.ts +2 -0
  49. package/locales/uk.esm.js +93 -0
  50. package/locales/uk.esm.js.map +1 -0
  51. package/locales/uk.js +97 -0
  52. package/locales/uk.js.map +1 -0
  53. package/locales/vi.d.ts +2 -0
  54. package/locales/vi.esm.d.ts +2 -0
  55. package/locales/vi.esm.js +93 -0
  56. package/locales/vi.esm.js.map +1 -0
  57. package/locales/vi.js +97 -0
  58. package/locales/vi.js.map +1 -0
  59. package/locales/zh-Hans.d.ts +2 -0
  60. package/locales/zh-Hans.esm.d.ts +2 -0
  61. package/locales/zh-Hans.esm.js +93 -0
  62. package/locales/zh-Hans.esm.js.map +1 -0
  63. package/locales/zh-Hans.js +97 -0
  64. package/locales/zh-Hans.js.map +1 -0
  65. package/locales/zh-Hant.d.ts +2 -0
  66. package/locales/zh-Hant.esm.d.ts +2 -0
  67. package/locales/zh-Hant.esm.js +93 -0
  68. package/locales/zh-Hant.esm.js.map +1 -0
  69. package/locales/zh-Hant.js +97 -0
  70. package/locales/zh-Hant.js.map +1 -0
  71. package/package.json +2 -1
  72. package/src/MaterialReactTable.tsx +2 -2
  73. package/src/body/MRT_TableBody.tsx +9 -9
  74. package/src/body/MRT_TableBodyCell.tsx +22 -22
  75. package/src/body/MRT_TableBodyCellValue.tsx +5 -5
  76. package/src/body/MRT_TableBodyRow.tsx +32 -32
  77. package/src/body/MRT_TableBodyRowGrabHandle.tsx +2 -2
  78. package/src/body/MRT_TableBodyRowPinButton.tsx +3 -3
  79. package/src/body/MRT_TableDetailPanel.tsx +3 -3
  80. package/src/buttons/MRT_CopyButton.tsx +1 -1
  81. package/src/buttons/MRT_EditActionButtons.tsx +4 -4
  82. package/src/buttons/MRT_ExpandAllButton.tsx +3 -3
  83. package/src/buttons/MRT_ExpandButton.tsx +1 -1
  84. package/src/buttons/MRT_GrabHandleButton.tsx +10 -10
  85. package/src/buttons/MRT_RowPinButton.tsx +5 -5
  86. package/src/buttons/MRT_ShowHideColumnsButton.tsx +1 -1
  87. package/src/buttons/MRT_ToggleFullScreenButton.tsx +2 -2
  88. package/src/buttons/MRT_ToggleRowActionMenuButton.tsx +8 -8
  89. package/src/column.utils.ts +23 -17
  90. package/src/filterFns.ts +29 -29
  91. package/src/footer/MRT_TableFooter.tsx +9 -9
  92. package/src/footer/MRT_TableFooterCell.tsx +1 -1
  93. package/src/footer/MRT_TableFooterRow.tsx +2 -2
  94. package/src/head/MRT_TableHead.tsx +9 -9
  95. package/src/head/MRT_TableHeadCell.tsx +10 -6
  96. package/src/head/MRT_TableHeadCellColumnActionsButton.tsx +9 -6
  97. package/src/head/MRT_TableHeadCellFilterContainer.tsx +11 -4
  98. package/src/head/MRT_TableHeadCellFilterLabel.tsx +106 -61
  99. package/src/head/MRT_TableHeadCellGrabHandle.tsx +2 -2
  100. package/src/head/MRT_TableHeadCellResizeHandle.tsx +11 -11
  101. package/src/head/MRT_TableHeadCellSortLabel.tsx +8 -8
  102. package/src/head/MRT_TableHeadRow.tsx +2 -2
  103. package/src/hooks/useMRT_DisplayColumns.tsx +5 -5
  104. package/src/hooks/useMRT_Effects.ts +3 -3
  105. package/src/hooks/useMRT_TableInstance.ts +15 -14
  106. package/src/hooks/useMRT_TableOptions.ts +3 -3
  107. package/src/icons.ts +2 -2
  108. package/src/inputs/MRT_EditCellTextField.tsx +9 -9
  109. package/src/inputs/MRT_FilterCheckbox.tsx +7 -7
  110. package/src/inputs/MRT_FilterRangeFields.tsx +1 -1
  111. package/src/inputs/MRT_FilterRangeSlider.tsx +6 -6
  112. package/src/inputs/MRT_FilterTextField.tsx +75 -75
  113. package/src/inputs/MRT_GlobalFilterTextField.tsx +26 -26
  114. package/src/inputs/MRT_SelectCheckbox.tsx +7 -7
  115. package/src/locales/fr.ts +1 -1
  116. package/src/menus/MRT_ColumnActionMenu.tsx +14 -14
  117. package/src/menus/MRT_FilterOptionMenu.tsx +35 -35
  118. package/src/menus/MRT_RowActionMenu.tsx +7 -7
  119. package/src/menus/MRT_ShowHideColumnsMenu.tsx +6 -6
  120. package/src/menus/MRT_ShowHideColumnsMenuItems.tsx +5 -5
  121. package/src/modals/MRT_EditRowModal.tsx +8 -8
  122. package/src/sortingFns.ts +1 -1
  123. package/src/table/MRT_Table.tsx +7 -7
  124. package/src/table/MRT_TableContainer.tsx +10 -10
  125. package/src/table/MRT_TablePaper.tsx +9 -9
  126. package/src/toolbar/MRT_BottomToolbar.tsx +5 -5
  127. package/src/toolbar/MRT_LinearProgressBar.tsx +4 -4
  128. package/src/toolbar/MRT_TablePagination.tsx +19 -19
  129. package/src/toolbar/MRT_ToolbarAlertBanner.tsx +4 -4
  130. package/src/toolbar/MRT_ToolbarDropZone.tsx +6 -6
  131. package/src/toolbar/MRT_ToolbarInternalButtons.tsx +8 -5
  132. package/src/toolbar/MRT_TopToolbar.tsx +7 -7
  133. package/src/types.ts +263 -263
  134. package/src/useMaterialReactTable.ts +1 -1
@@ -1,4 +1,6 @@
1
1
  import { type Dispatch, type MutableRefObject, type ReactNode, type RefObject, type SetStateAction } from 'react';
2
+ import { type AggregationFn, type Cell, type Column, type ColumnDef, type ColumnFiltersState, type ColumnOrderState, type ColumnPinningState, type ColumnSizingInfoState, type ColumnSizingState, type DeepKeys, 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';
2
4
  import { type AlertProps } from '@mui/material/Alert';
3
5
  import { type ButtonProps } from '@mui/material/Button';
4
6
  import { type CheckboxProps } from '@mui/material/Checkbox';
@@ -10,22 +12,20 @@ import { type PaperProps } from '@mui/material/Paper';
10
12
  import { type RadioProps } from '@mui/material/Radio';
11
13
  import { type SkeletonProps } from '@mui/material/Skeleton';
12
14
  import { type SliderProps } from '@mui/material/Slider';
15
+ import { type TableProps } from '@mui/material/Table';
13
16
  import { type TableBodyProps } from '@mui/material/TableBody';
14
17
  import { type TableCellProps } from '@mui/material/TableCell';
15
18
  import { type TableContainerProps } from '@mui/material/TableContainer';
16
19
  import { type TableFooterProps } from '@mui/material/TableFooter';
17
20
  import { type TableHeadProps } from '@mui/material/TableHead';
18
21
  import { type TablePaginationProps } from '@mui/material/TablePagination';
19
- import { type TableProps } from '@mui/material/Table';
20
22
  import { type TableRowProps } from '@mui/material/TableRow';
21
23
  import { type TextFieldProps } from '@mui/material/TextField';
22
24
  import { type ToolbarProps } from '@mui/material/Toolbar';
23
- import { type AggregationFn, type Cell, type Column, type ColumnDef, type ColumnFiltersState, type ColumnOrderState, type ColumnPinningState, type ColumnSizingInfoState, type ColumnSizingState, type DeepKeys, 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';
24
- import { type VirtualizerOptions, type Virtualizer, type VirtualItem } from '@tanstack/react-virtual';
25
25
  import { type MRT_AggregationFns } from './aggregationFns';
26
26
  import { type MRT_FilterFns } from './filterFns';
27
- import { type MRT_SortingFns } from './sortingFns';
28
27
  import { type MRT_Icons } from './icons';
28
+ import { type MRT_SortingFns } from './sortingFns';
29
29
  export type { MRT_Icons };
30
30
  export type LiteralUnion<T extends U, U = string> = T | (U & Record<never, never>);
31
31
  export type Prettify<T> = {
@@ -71,10 +71,9 @@ export interface MRT_Localization {
71
71
  filterFuzzy: string;
72
72
  filterGreaterThan: string;
73
73
  filterGreaterThanOrEqualTo: string;
74
+ filterInNumberRange: string;
74
75
  filterIncludesString: string;
75
76
  filterIncludesStringSensitive: string;
76
- filteringByColumn: string;
77
- filterInNumberRange: string;
78
77
  filterLessThan: string;
79
78
  filterLessThanOrEqualTo: string;
80
79
  filterMode: string;
@@ -82,6 +81,7 @@ export interface MRT_Localization {
82
81
  filterNotEquals: string;
83
82
  filterStartsWith: string;
84
83
  filterWeakEquals: string;
84
+ filteringByColumn: string;
85
85
  goToFirstPage: string;
86
86
  goToLastPage: string;
87
87
  goToNextPage: string;
@@ -164,26 +164,26 @@ export type MRT_TableInstance<TData extends Record<string, any>> = Omit<Table<TD
164
164
  filterInputRefs: MutableRefObject<Record<string, HTMLInputElement>>;
165
165
  searchInputRef: MutableRefObject<HTMLInputElement>;
166
166
  tableContainerRef: MutableRefObject<HTMLDivElement>;
167
+ tableFooterRef: MutableRefObject<HTMLTableSectionElement>;
167
168
  tableHeadCellRefs: MutableRefObject<Record<string, HTMLTableCellElement>>;
169
+ tableHeadRef: MutableRefObject<HTMLTableSectionElement>;
168
170
  tablePaperRef: MutableRefObject<HTMLDivElement>;
169
171
  topToolbarRef: MutableRefObject<HTMLDivElement>;
170
- tableHeadRef: MutableRefObject<HTMLTableSectionElement>;
171
- tableFooterRef: MutableRefObject<HTMLTableSectionElement>;
172
172
  };
173
- setCreatingRow: Dispatch<SetStateAction<MRT_Row<TData> | null | true>>;
174
173
  setColumnFilterFns: Dispatch<SetStateAction<MRT_ColumnFilterFnsState>>;
174
+ setCreatingRow: Dispatch<SetStateAction<MRT_Row<TData> | null | true>>;
175
175
  setDensity: Dispatch<SetStateAction<MRT_DensityState>>;
176
176
  setDraggingColumn: Dispatch<SetStateAction<MRT_Column<TData> | null>>;
177
177
  setDraggingRow: Dispatch<SetStateAction<MRT_Row<TData> | null>>;
178
178
  setEditingCell: Dispatch<SetStateAction<MRT_Cell<TData> | null>>;
179
179
  setEditingRow: Dispatch<SetStateAction<MRT_Row<TData> | null>>;
180
180
  setGlobalFilterFn: Dispatch<SetStateAction<MRT_FilterOption>>;
181
- setHoveredColumn: Dispatch<SetStateAction<MRT_Column<TData> | {
181
+ setHoveredColumn: Dispatch<SetStateAction<{
182
182
  id: string;
183
- } | null>>;
184
- setHoveredRow: Dispatch<SetStateAction<MRT_Row<TData> | {
183
+ } | MRT_Column<TData> | null>>;
184
+ setHoveredRow: Dispatch<SetStateAction<{
185
185
  id: string;
186
- } | null>>;
186
+ } | MRT_Row<TData> | null>>;
187
187
  setIsFullScreen: Dispatch<SetStateAction<boolean>>;
188
188
  setShowAlertBanner: Dispatch<SetStateAction<boolean>>;
189
189
  setShowColumnFilters: Dispatch<SetStateAction<boolean>>;
@@ -191,8 +191,8 @@ export type MRT_TableInstance<TData extends Record<string, any>> = Omit<Table<TD
191
191
  setShowToolbarDropZone: Dispatch<SetStateAction<boolean>>;
192
192
  };
193
193
  export type MRT_DefinedTableOptions<TData extends Record<string, any>> = MRT_TableOptions<TData> & {
194
- localization: MRT_Localization;
195
194
  icons: MRT_Icons;
195
+ localization: MRT_Localization;
196
196
  };
197
197
  export type MRT_TableState<TData extends Record<string, any>> = TableState & {
198
198
  columnFilterFns: MRT_ColumnFilterFnsState;
@@ -203,12 +203,12 @@ export type MRT_TableState<TData extends Record<string, any>> = TableState & {
203
203
  editingCell: MRT_Cell<TData> | null;
204
204
  editingRow: MRT_Row<TData> | null;
205
205
  globalFilterFn: MRT_FilterOption;
206
- hoveredColumn: MRT_Column<TData> | {
206
+ hoveredColumn: {
207
207
  id: string;
208
- } | null;
209
- hoveredRow: MRT_Row<TData> | {
208
+ } | MRT_Column<TData> | null;
209
+ hoveredRow: {
210
210
  id: string;
211
- } | null;
211
+ } | MRT_Row<TData> | null;
212
212
  isFullScreen: boolean;
213
213
  isLoading: boolean;
214
214
  isSaving: boolean;
@@ -228,8 +228,8 @@ export type MRT_ColumnDef<TData extends Record<string, any>> = Omit<ColumnDef<TD
228
228
  }) => ReactNode;
229
229
  Cell?: (props: {
230
230
  cell: MRT_Cell<TData>;
231
- renderedCellValue: number | string | ReactNode;
232
231
  column: MRT_Column<TData>;
232
+ renderedCellValue: ReactNode | number | string;
233
233
  row: MRT_Row<TData>;
234
234
  rowRef?: RefObject<HTMLTableRowElement>;
235
235
  table: MRT_TableInstance<TData>;
@@ -246,22 +246,22 @@ export type MRT_ColumnDef<TData extends Record<string, any>> = Omit<ColumnDef<TD
246
246
  rangeFilterIndex?: number;
247
247
  table: MRT_TableInstance<TData>;
248
248
  }) => ReactNode;
249
- Footer?: ReactNode | ((props: {
249
+ Footer?: ((props: {
250
250
  column: MRT_Column<TData>;
251
251
  footer: MRT_Header<TData>;
252
252
  table: MRT_TableInstance<TData>;
253
- }) => ReactNode);
253
+ }) => ReactNode) | ReactNode;
254
254
  GroupedCell?: (props: {
255
255
  cell: MRT_Cell<TData>;
256
256
  column: MRT_Column<TData>;
257
257
  row: MRT_Row<TData>;
258
258
  table: MRT_TableInstance<TData>;
259
259
  }) => ReactNode;
260
- Header?: ReactNode | ((props: {
260
+ Header?: ((props: {
261
261
  column: MRT_Column<TData>;
262
262
  header: MRT_Header<TData>;
263
263
  table: MRT_TableInstance<TData>;
264
- }) => ReactNode);
264
+ }) => ReactNode) | ReactNode;
265
265
  PlaceholderCell?: (props: {
266
266
  cell: MRT_Cell<TData>;
267
267
  column: MRT_Column<TData>;
@@ -283,8 +283,8 @@ export type MRT_ColumnDef<TData extends Record<string, any>> = Omit<ColumnDef<TD
283
283
  * @example accessorKey: 'username' //simple
284
284
  * @example accessorKey: 'name.firstName' //deep key dot notation
285
285
  */
286
- accessorKey?: (string & {}) | DeepKeys<TData>;
287
- aggregationFn?: MRT_AggregationFn<TData> | Array<MRT_AggregationFn<TData>>;
286
+ accessorKey?: DeepKeys<TData> | (string & {});
287
+ aggregationFn?: Array<MRT_AggregationFn<TData>> | MRT_AggregationFn<TData>;
288
288
  /**
289
289
  * Specify what type of column this is. Either `data`, `display`, or `group`. Defaults to `data`.
290
290
  * Leave this blank if you are just creating a normal data column.
@@ -296,23 +296,23 @@ export type MRT_ColumnDef<TData extends Record<string, any>> = Omit<ColumnDef<TD
296
296
  columnDefType?: 'data' | 'display' | 'group';
297
297
  columnFilterModeOptions?: Array<LiteralUnion<string & MRT_FilterOption>> | null;
298
298
  columns?: MRT_ColumnDef<TData>[];
299
- editSelectOptions?: (string | {
299
+ editSelectOptions?: ({
300
300
  text: string;
301
301
  value: any;
302
- })[];
303
- editVariant?: 'text' | 'select';
302
+ } | string)[];
303
+ editVariant?: 'select' | 'text';
304
304
  enableClickToCopy?: boolean;
305
305
  enableColumnActions?: boolean;
306
306
  enableColumnDragging?: boolean;
307
307
  enableColumnFilterModes?: boolean;
308
308
  enableColumnOrdering?: boolean;
309
- enableEditing?: boolean | ((row: MRT_Row<TData>) => boolean);
309
+ enableEditing?: ((row: MRT_Row<TData>) => boolean) | boolean;
310
310
  enableFilterMatchHighlighting?: boolean;
311
311
  filterFn?: MRT_FilterFn<TData>;
312
- filterSelectOptions?: (string | {
312
+ filterSelectOptions?: ({
313
313
  text: string;
314
314
  value: any;
315
- })[];
315
+ } | string)[];
316
316
  filterVariant?: 'checkbox' | 'multi-select' | 'range' | 'range-slider' | 'select' | 'text';
317
317
  /**
318
318
  * footer must be a string. If you want custom JSX to render the footer, you can also specify a `Footer` option. (Capital F)
@@ -332,53 +332,53 @@ export type MRT_ColumnDef<TData extends Record<string, any>> = Omit<ColumnDef<TD
332
332
  * @default gets set to the same value as `accessorKey` by default
333
333
  */
334
334
  id?: LiteralUnion<string & keyof TData>;
335
- muiCopyButtonProps?: ButtonProps | ((props: {
336
- cell: MRT_Cell<TData>;
335
+ muiColumnActionsButtonProps?: ((props: {
336
+ column: MRT_Column<TData>;
337
+ table: MRT_TableInstance<TData>;
338
+ }) => IconButtonProps) | IconButtonProps;
339
+ muiColumnDragHandleProps?: ((props: {
337
340
  column: MRT_Column<TData>;
338
- row: MRT_Row<TData>;
339
341
  table: MRT_TableInstance<TData>;
340
- }) => ButtonProps);
341
- muiEditTextFieldProps?: TextFieldProps | ((props: {
342
+ }) => IconButtonProps) | IconButtonProps;
343
+ muiCopyButtonProps?: ((props: {
342
344
  cell: MRT_Cell<TData>;
343
345
  column: MRT_Column<TData>;
344
346
  row: MRT_Row<TData>;
345
347
  table: MRT_TableInstance<TData>;
346
- }) => TextFieldProps);
347
- muiTableBodyCellProps?: TableCellProps | ((props: {
348
+ }) => ButtonProps) | ButtonProps;
349
+ muiEditTextFieldProps?: ((props: {
348
350
  cell: MRT_Cell<TData>;
349
351
  column: MRT_Column<TData>;
350
352
  row: MRT_Row<TData>;
351
353
  table: MRT_TableInstance<TData>;
352
- }) => TableCellProps);
353
- muiTableFooterCellProps?: TableCellProps | ((props: {
354
- table: MRT_TableInstance<TData>;
354
+ }) => TextFieldProps) | TextFieldProps;
355
+ muiFilterCheckboxProps?: ((props: {
355
356
  column: MRT_Column<TData>;
356
- }) => TableCellProps);
357
- muiColumnActionsButtonProps?: IconButtonProps | ((props: {
358
357
  table: MRT_TableInstance<TData>;
358
+ }) => CheckboxProps) | CheckboxProps;
359
+ muiFilterSliderProps?: ((props: {
359
360
  column: MRT_Column<TData>;
360
- }) => IconButtonProps);
361
- muiColumnDragHandleProps?: IconButtonProps | ((props: {
362
361
  table: MRT_TableInstance<TData>;
362
+ }) => SliderProps) | SliderProps;
363
+ muiFilterTextFieldProps?: ((props: {
363
364
  column: MRT_Column<TData>;
364
- }) => IconButtonProps);
365
- muiFilterCheckboxProps?: CheckboxProps | ((props: {
366
- column: MRT_Column<TData>;
367
- table: MRT_TableInstance<TData>;
368
- }) => CheckboxProps);
369
- muiFilterTextFieldProps?: TextFieldProps | ((props: {
365
+ rangeFilterIndex?: number;
370
366
  table: MRT_TableInstance<TData>;
367
+ }) => TextFieldProps) | TextFieldProps;
368
+ muiTableBodyCellProps?: ((props: {
369
+ cell: MRT_Cell<TData>;
371
370
  column: MRT_Column<TData>;
372
- rangeFilterIndex?: number;
373
- }) => TextFieldProps);
374
- muiFilterSliderProps?: SliderProps | ((props: {
371
+ row: MRT_Row<TData>;
375
372
  table: MRT_TableInstance<TData>;
373
+ }) => TableCellProps) | TableCellProps;
374
+ muiTableFooterCellProps?: ((props: {
376
375
  column: MRT_Column<TData>;
377
- }) => SliderProps);
378
- muiTableHeadCellProps?: TableCellProps | ((props: {
379
376
  table: MRT_TableInstance<TData>;
377
+ }) => TableCellProps) | TableCellProps;
378
+ muiTableHeadCellProps?: ((props: {
380
379
  column: MRT_Column<TData>;
381
- }) => TableCellProps);
380
+ table: MRT_TableInstance<TData>;
381
+ }) => TableCellProps) | TableCellProps;
382
382
  renderColumnActionsMenuItems?: (props: {
383
383
  closeMenu: () => void;
384
384
  column: MRT_Column<TData>;
@@ -393,12 +393,12 @@ export type MRT_ColumnDef<TData extends Record<string, any>> = Omit<ColumnDef<TD
393
393
  }) => ReactNode[];
394
394
  sortingFn?: MRT_SortingFn<TData>;
395
395
  };
396
- export type MRT_DefinedColumnDef<TData extends Record<string, any>> = Omit<MRT_ColumnDef<TData>, 'id' | 'defaultDisplayColumn'> & {
396
+ export type MRT_DefinedColumnDef<TData extends Record<string, any>> = Omit<MRT_ColumnDef<TData>, 'defaultDisplayColumn' | 'id'> & {
397
+ _filterFn: MRT_FilterOption;
397
398
  defaultDisplayColumn: Partial<MRT_ColumnDef<TData>>;
398
399
  id: string;
399
- _filterFn: MRT_FilterOption;
400
400
  };
401
- export type MRT_Column<TData extends Record<string, any>> = Omit<Column<TData, unknown>, 'header' | 'footer' | 'columns' | 'columnDef' | 'filterFn'> & {
401
+ export type MRT_Column<TData extends Record<string, any>> = Omit<Column<TData, unknown>, 'columnDef' | 'columns' | 'filterFn' | 'footer' | 'header'> & {
402
402
  columnDef: MRT_DefinedColumnDef<TData>;
403
403
  columns?: MRT_Column<TData>[];
404
404
  filterFn?: MRT_FilterFn<TData>;
@@ -411,11 +411,11 @@ export type MRT_Header<TData extends Record<string, any>> = Omit<Header<TData, u
411
411
  export type MRT_HeaderGroup<TData extends Record<string, any>> = Omit<HeaderGroup<TData>, 'headers'> & {
412
412
  headers: MRT_Header<TData>[];
413
413
  };
414
- export type MRT_Row<TData extends Record<string, any>> = Omit<Row<TData>, 'getVisibleCells' | 'getAllCells' | 'subRows' | '_valuesCache'> & {
414
+ export type MRT_Row<TData extends Record<string, any>> = Omit<Row<TData>, '_valuesCache' | 'getAllCells' | 'getVisibleCells' | 'subRows'> & {
415
+ _valuesCache: Record<LiteralUnion<string & DeepKeys<TData>>, any>;
415
416
  getAllCells: () => MRT_Cell<TData>[];
416
417
  getVisibleCells: () => MRT_Cell<TData>[];
417
418
  subRows?: MRT_Row<TData>[];
418
- _valuesCache: Record<LiteralUnion<string & DeepKeys<TData>>, any>;
419
419
  };
420
420
  export type MRT_Cell<TData extends Record<string, any>> = Omit<Cell<TData, unknown>, 'column' | 'row'> & {
421
421
  column: MRT_Column<TData>;
@@ -424,7 +424,7 @@ export type MRT_Cell<TData extends Record<string, any>> = Omit<Cell<TData, unkno
424
424
  export type MRT_AggregationOption = string & keyof typeof MRT_AggregationFns;
425
425
  export type MRT_AggregationFn<TData extends Record<string, any>> = AggregationFn<TData> | MRT_AggregationOption;
426
426
  export type MRT_SortingOption = LiteralUnion<string & keyof typeof MRT_SortingFns>;
427
- export type MRT_SortingFn<TData extends Record<string, any>> = SortingFn<TData> | MRT_SortingOption;
427
+ export type MRT_SortingFn<TData extends Record<string, any>> = MRT_SortingOption | SortingFn<TData>;
428
428
  export type MRT_FilterOption = LiteralUnion<string & keyof typeof MRT_FilterFns>;
429
429
  export type MRT_FilterFn<TData extends Record<string, any>> = FilterFn<TData> | MRT_FilterOption;
430
430
  export type MRT_InternalFilterOption = {
@@ -433,7 +433,7 @@ export type MRT_InternalFilterOption = {
433
433
  option: string;
434
434
  symbol: string;
435
435
  };
436
- export type MRT_DisplayColumnIds = 'mrt-row-actions' | 'mrt-row-drag' | 'mrt-row-expand' | 'mrt-row-numbers' | 'mrt-row-select' | 'mrt-row-pin';
436
+ export type MRT_DisplayColumnIds = 'mrt-row-actions' | 'mrt-row-drag' | 'mrt-row-expand' | 'mrt-row-numbers' | 'mrt-row-pin' | 'mrt-row-select';
437
437
  /**
438
438
  * `columns` and `data` props are the only required props, but there are over 170 other optional props.
439
439
  *
@@ -444,7 +444,12 @@ export type MRT_DisplayColumnIds = 'mrt-row-actions' | 'mrt-row-drag' | 'mrt-row
444
444
  * @link https://www.material-react-table.com/docs/api/props
445
445
  */
446
446
  export type MRT_TableOptions<TData extends Record<string, any>> = Omit<Partial<TableOptions<TData>>, 'columns' | 'data' | 'defaultColumn' | 'enableRowSelection' | 'expandRowsFn' | 'getRowId' | 'globalFilterFn' | 'initialState' | 'onStateChange' | 'state'> & {
447
+ columnFilterDisplayMode?: 'custom' | 'popover' | 'subheader';
447
448
  columnFilterModeOptions?: Array<LiteralUnion<string & MRT_FilterOption>> | null;
449
+ columnVirtualizerInstanceRef?: MutableRefObject<Virtualizer<HTMLDivElement, HTMLTableCellElement> | null>;
450
+ columnVirtualizerOptions?: ((props: {
451
+ table: MRT_TableInstance<TData>;
452
+ }) => Partial<VirtualizerOptions<HTMLDivElement, HTMLTableCellElement>>) | Partial<VirtualizerOptions<HTMLDivElement, HTMLTableCellElement>>;
448
453
  /**
449
454
  * The columns to display in the table. `accessorKey`s or `accessorFn`s must match keys in the `data` prop.
450
455
  *
@@ -456,10 +461,7 @@ export type MRT_TableOptions<TData extends Record<string, any>> = Omit<Partial<T
456
461
  * @link https://www.material-react-table.com/docs/api/column-options
457
462
  */
458
463
  columns: MRT_ColumnDef<TData>[];
459
- columnVirtualizerInstanceRef?: MutableRefObject<Virtualizer<HTMLDivElement, HTMLTableCellElement> | null>;
460
- columnVirtualizerOptions?: Partial<VirtualizerOptions<HTMLDivElement, HTMLTableCellElement>> | ((props: {
461
- table: MRT_TableInstance<TData>;
462
- }) => Partial<VirtualizerOptions<HTMLDivElement, HTMLTableCellElement>>);
464
+ createDisplayMode?: 'custom' | 'modal' | 'row';
463
465
  /**
464
466
  * Pass your data as an array of objects. Objects can theoretically be any shape, but it's best to keep them consistent.
465
467
  *
@@ -478,12 +480,7 @@ export type MRT_TableOptions<TData extends Record<string, any>> = Omit<Partial<T
478
480
  displayColumnDefOptions?: Partial<{
479
481
  [key in MRT_DisplayColumnIds]: Partial<MRT_ColumnDef<TData>>;
480
482
  }>;
481
- createDisplayMode?: 'modal' | 'row' | 'custom';
482
- editDisplayMode?: 'modal' | 'row' | 'cell' | 'table' | 'custom';
483
- columnFilterDisplayMode?: 'subheader' | 'popover' | 'custom';
484
- paginationDisplayMode?: 'default' | 'pages' | 'custom';
485
- selectDisplayMode?: 'checkbox' | 'radio' | 'switch';
486
- rowPinningDisplayMode?: 'sticky' | 'top' | 'bottom' | 'top-and-bottom' | 'select-sticky' | 'select-top' | 'select-bottom';
483
+ editDisplayMode?: 'cell' | 'custom' | 'modal' | 'row' | 'table';
487
484
  enableBottomToolbar?: boolean;
488
485
  enableClickToCopy?: boolean;
489
486
  enableColumnActions?: boolean;
@@ -492,7 +489,7 @@ export type MRT_TableOptions<TData extends Record<string, any>> = Omit<Partial<T
492
489
  enableColumnOrdering?: boolean;
493
490
  enableColumnVirtualization?: boolean;
494
491
  enableDensityToggle?: boolean;
495
- enableEditing?: boolean | ((row: MRT_Row<TData>) => boolean);
492
+ enableEditing?: ((row: MRT_Row<TData>) => boolean) | boolean;
496
493
  enableExpandAll?: boolean;
497
494
  enableFacetedValues?: boolean;
498
495
  enableFilterMatchHighlighting?: boolean;
@@ -504,7 +501,7 @@ export type MRT_TableOptions<TData extends Record<string, any>> = Omit<Partial<T
504
501
  enableRowDragging?: boolean;
505
502
  enableRowNumbers?: boolean;
506
503
  enableRowOrdering?: boolean;
507
- enableRowSelection?: boolean | ((row: MRT_Row<TData>) => boolean);
504
+ enableRowSelection?: ((row: MRT_Row<TData>) => boolean) | boolean;
508
505
  enableRowVirtualization?: boolean;
509
506
  enableSelectAll?: boolean;
510
507
  enableStickyFooter?: boolean;
@@ -522,7 +519,7 @@ export type MRT_TableOptions<TData extends Record<string, any>> = Omit<Partial<T
522
519
  /**
523
520
  * 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
524
521
  */
525
- layoutMode?: 'semantic' | 'grid';
522
+ layoutMode?: 'grid' | 'semantic';
526
523
  /**
527
524
  * Pass in either a locale imported from `material-react-table/locales/*` or a custom locale object.
528
525
  *
@@ -537,143 +534,146 @@ export type MRT_TableOptions<TData extends Record<string, any>> = Omit<Partial<T
537
534
  * @link https://www.material-react-table.com/docs/guides/memoize-components
538
535
  */
539
536
  memoMode?: 'cells' | 'rows' | 'table-body';
540
- muiBottomToolbarProps?: ToolbarProps | ((props: {
537
+ muiBottomToolbarProps?: ((props: {
541
538
  table: MRT_TableInstance<TData>;
542
- }) => ToolbarProps);
543
- muiExpandAllButtonProps?: IconButtonProps | ((props: {
539
+ }) => ToolbarProps) | ToolbarProps;
540
+ muiColumnActionsButtonProps?: ((props: {
541
+ column: MRT_Column<TData>;
544
542
  table: MRT_TableInstance<TData>;
545
- }) => IconButtonProps);
546
- muiExpandButtonProps?: IconButtonProps | ((props: {
543
+ }) => IconButtonProps) | IconButtonProps;
544
+ muiColumnDragHandleProps?: ((props: {
545
+ column: MRT_Column<TData>;
547
546
  table: MRT_TableInstance<TData>;
547
+ }) => IconButtonProps) | IconButtonProps;
548
+ muiCopyButtonProps?: ((props: {
549
+ cell: MRT_Cell<TData>;
550
+ column: MRT_Column<TData>;
548
551
  row: MRT_Row<TData>;
549
- }) => IconButtonProps);
550
- muiLinearProgressProps?: LinearProgressProps | ((props: {
551
- isTopToolbar: boolean;
552
- table: MRT_TableInstance<TData>;
553
- }) => LinearProgressProps);
554
- muiSearchTextFieldProps?: TextFieldProps | ((props: {
555
552
  table: MRT_TableInstance<TData>;
556
- }) => TextFieldProps);
557
- muiSelectAllCheckboxProps?: CheckboxProps | ((props: {
553
+ }) => ButtonProps) | ButtonProps;
554
+ muiCreateRowModalProps?: ((props: {
555
+ row: MRT_Row<TData>;
558
556
  table: MRT_TableInstance<TData>;
559
- }) => CheckboxProps);
560
- muiSelectCheckboxProps?: (CheckboxProps | RadioProps) | ((props: {
557
+ }) => DialogProps) | DialogProps;
558
+ muiDetailPanelProps?: ((props: {
559
+ row: MRT_Row<TData>;
561
560
  table: MRT_TableInstance<TData>;
561
+ }) => TableCellProps) | TableCellProps;
562
+ muiEditRowModalProps?: ((props: {
562
563
  row: MRT_Row<TData>;
563
- }) => CheckboxProps | RadioProps);
564
- muiCopyButtonProps?: ButtonProps | ((props: {
564
+ table: MRT_TableInstance<TData>;
565
+ }) => DialogProps) | DialogProps;
566
+ muiEditTextFieldProps?: ((props: {
565
567
  cell: MRT_Cell<TData>;
566
568
  column: MRT_Column<TData>;
567
569
  row: MRT_Row<TData>;
568
570
  table: MRT_TableInstance<TData>;
569
- }) => ButtonProps);
570
- muiEditTextFieldProps?: TextFieldProps | ((props: {
571
- cell: MRT_Cell<TData>;
572
- column: MRT_Column<TData>;
571
+ }) => TextFieldProps) | TextFieldProps;
572
+ muiExpandAllButtonProps?: ((props: {
573
+ table: MRT_TableInstance<TData>;
574
+ }) => IconButtonProps) | IconButtonProps;
575
+ muiExpandButtonProps?: ((props: {
573
576
  row: MRT_Row<TData>;
574
577
  table: MRT_TableInstance<TData>;
575
- }) => TextFieldProps);
576
- muiTableBodyCellProps?: TableCellProps | ((props: {
577
- cell: MRT_Cell<TData>;
578
+ }) => IconButtonProps) | IconButtonProps;
579
+ muiFilterCheckboxProps?: ((props: {
578
580
  column: MRT_Column<TData>;
579
- row: MRT_Row<TData>;
580
581
  table: MRT_TableInstance<TData>;
581
- }) => TableCellProps);
582
- muiSkeletonProps?: SkeletonProps | ((props: {
583
- cell: MRT_Cell<TData>;
582
+ }) => CheckboxProps) | CheckboxProps;
583
+ muiFilterSliderProps?: ((props: {
584
584
  column: MRT_Column<TData>;
585
- row: MRT_Row<TData>;
586
585
  table: MRT_TableInstance<TData>;
587
- }) => SkeletonProps);
588
- muiTableBodyProps?: TableBodyProps | ((props: {
586
+ }) => SliderProps) | SliderProps;
587
+ muiFilterTextFieldProps?: ((props: {
588
+ column: MRT_Column<TData>;
589
+ rangeFilterIndex?: number;
589
590
  table: MRT_TableInstance<TData>;
590
- }) => TableBodyProps);
591
- muiRowDragHandleProps?: IconButtonProps | ((props: {
591
+ }) => TextFieldProps) | TextFieldProps;
592
+ muiLinearProgressProps?: ((props: {
593
+ isTopToolbar: boolean;
592
594
  table: MRT_TableInstance<TData>;
595
+ }) => LinearProgressProps) | LinearProgressProps;
596
+ muiRowDragHandleProps?: ((props: {
593
597
  row: MRT_Row<TData>;
594
- }) => IconButtonProps);
595
- muiTableBodyRowProps?: TableRowProps | ((props: {
596
- isDetailPanel?: boolean;
597
- row: MRT_Row<TData>;
598
- staticRowIndex: number;
599
598
  table: MRT_TableInstance<TData>;
600
- }) => TableRowProps);
601
- muiTableContainerProps?: TableContainerProps | ((props: {
599
+ }) => IconButtonProps) | IconButtonProps;
600
+ muiSearchTextFieldProps?: ((props: {
602
601
  table: MRT_TableInstance<TData>;
603
- }) => TableContainerProps);
604
- muiDetailPanelProps?: TableCellProps | ((props: {
602
+ }) => TextFieldProps) | TextFieldProps;
603
+ muiSelectAllCheckboxProps?: ((props: {
605
604
  table: MRT_TableInstance<TData>;
605
+ }) => CheckboxProps) | CheckboxProps;
606
+ muiSelectCheckboxProps?: ((props: {
606
607
  row: MRT_Row<TData>;
607
- }) => TableCellProps);
608
- muiTableFooterCellProps?: TableCellProps | ((props: {
609
608
  table: MRT_TableInstance<TData>;
609
+ }) => CheckboxProps | RadioProps) | (CheckboxProps | RadioProps);
610
+ muiSkeletonProps?: ((props: {
611
+ cell: MRT_Cell<TData>;
610
612
  column: MRT_Column<TData>;
611
- }) => TableCellProps);
612
- muiTableFooterProps?: TableFooterProps | ((props: {
613
- table: MRT_TableInstance<TData>;
614
- }) => TableFooterProps);
615
- muiTableFooterRowProps?: TableRowProps | ((props: {
616
- table: MRT_TableInstance<TData>;
617
- footerGroup: MRT_HeaderGroup<TData>;
618
- }) => TableRowProps);
619
- muiColumnActionsButtonProps?: IconButtonProps | ((props: {
613
+ row: MRT_Row<TData>;
620
614
  table: MRT_TableInstance<TData>;
615
+ }) => SkeletonProps) | SkeletonProps;
616
+ muiTableBodyCellProps?: ((props: {
617
+ cell: MRT_Cell<TData>;
621
618
  column: MRT_Column<TData>;
622
- }) => IconButtonProps);
623
- muiColumnDragHandleProps?: IconButtonProps | ((props: {
619
+ row: MRT_Row<TData>;
624
620
  table: MRT_TableInstance<TData>;
625
- column: MRT_Column<TData>;
626
- }) => IconButtonProps);
627
- muiFilterCheckboxProps?: CheckboxProps | ((props: {
628
- column: MRT_Column<TData>;
621
+ }) => TableCellProps) | TableCellProps;
622
+ muiTableBodyProps?: ((props: {
629
623
  table: MRT_TableInstance<TData>;
630
- }) => CheckboxProps);
631
- muiFilterTextFieldProps?: TextFieldProps | ((props: {
624
+ }) => TableBodyProps) | TableBodyProps;
625
+ muiTableBodyRowProps?: ((props: {
626
+ isDetailPanel?: boolean;
627
+ row: MRT_Row<TData>;
628
+ staticRowIndex: number;
632
629
  table: MRT_TableInstance<TData>;
633
- column: MRT_Column<TData>;
634
- rangeFilterIndex?: number;
635
- }) => TextFieldProps);
636
- muiFilterSliderProps?: SliderProps | ((props: {
630
+ }) => TableRowProps) | TableRowProps;
631
+ muiTableContainerProps?: ((props: {
637
632
  table: MRT_TableInstance<TData>;
633
+ }) => TableContainerProps) | TableContainerProps;
634
+ muiTableFooterCellProps?: ((props: {
638
635
  column: MRT_Column<TData>;
639
- }) => SliderProps);
640
- muiCreateRowModalProps?: DialogProps | ((props: {
641
- row: MRT_Row<TData>;
642
636
  table: MRT_TableInstance<TData>;
643
- }) => DialogProps);
644
- muiEditRowModalProps?: DialogProps | ((props: {
645
- row: MRT_Row<TData>;
637
+ }) => TableCellProps) | TableCellProps;
638
+ muiTableFooterProps?: ((props: {
646
639
  table: MRT_TableInstance<TData>;
647
- }) => DialogProps);
648
- muiTableHeadCellProps?: TableCellProps | ((props: {
640
+ }) => TableFooterProps) | TableFooterProps;
641
+ muiTableFooterRowProps?: ((props: {
642
+ footerGroup: MRT_HeaderGroup<TData>;
649
643
  table: MRT_TableInstance<TData>;
644
+ }) => TableRowProps) | TableRowProps;
645
+ muiTableHeadCellProps?: ((props: {
650
646
  column: MRT_Column<TData>;
651
- }) => TableCellProps);
652
- muiTableHeadProps?: TableHeadProps | ((props: {
653
647
  table: MRT_TableInstance<TData>;
654
- }) => TableHeadProps);
655
- muiTableHeadRowProps?: TableRowProps | ((props: {
648
+ }) => TableCellProps) | TableCellProps;
649
+ muiTableHeadProps?: ((props: {
656
650
  table: MRT_TableInstance<TData>;
651
+ }) => TableHeadProps) | TableHeadProps;
652
+ muiTableHeadRowProps?: ((props: {
657
653
  headerGroup: MRT_HeaderGroup<TData>;
658
- }) => TableRowProps);
659
- muiTablePaginationProps?: Partial<Omit<TablePaginationProps, 'rowsPerPage'>> | ((props: {
660
654
  table: MRT_TableInstance<TData>;
661
- }) => Partial<Omit<TablePaginationProps, 'rowsPerPage'>>);
662
- muiTablePaperProps?: PaperProps | ((props: {
655
+ }) => TableRowProps) | TableRowProps;
656
+ muiTablePaginationProps?: ((props: {
657
+ table: MRT_TableInstance<TData>;
658
+ }) => Partial<Omit<TablePaginationProps, 'rowsPerPage'>>) | Partial<Omit<TablePaginationProps, 'rowsPerPage'>>;
659
+ muiTablePaperProps?: ((props: {
663
660
  table: MRT_TableInstance<TData>;
664
- }) => PaperProps);
665
- muiTableProps?: TableProps | ((props: {
661
+ }) => PaperProps) | PaperProps;
662
+ muiTableProps?: ((props: {
666
663
  table: MRT_TableInstance<TData>;
667
- }) => TableProps);
668
- muiToolbarAlertBannerChipProps?: ChipProps | ((props: {
664
+ }) => TableProps) | TableProps;
665
+ muiToolbarAlertBannerChipProps?: ((props: {
669
666
  table: MRT_TableInstance<TData>;
670
- }) => ChipProps);
671
- muiToolbarAlertBannerProps?: AlertProps | ((props: {
667
+ }) => ChipProps) | ChipProps;
668
+ muiToolbarAlertBannerProps?: ((props: {
672
669
  table: MRT_TableInstance<TData>;
673
- }) => AlertProps);
674
- muiTopToolbarProps?: ToolbarProps | ((props: {
670
+ }) => AlertProps) | AlertProps;
671
+ muiTopToolbarProps?: ((props: {
675
672
  table: MRT_TableInstance<TData>;
676
- }) => ToolbarProps);
673
+ }) => ToolbarProps) | ToolbarProps;
674
+ onColumnFilterFnsChange?: OnChangeFn<{
675
+ [key: string]: MRT_FilterOption;
676
+ }>;
677
677
  onCreatingRowCancel?: (props: {
678
678
  row: MRT_Row<TData>;
679
679
  table: MRT_TableInstance<TData>;
@@ -685,9 +685,6 @@ export type MRT_TableOptions<TData extends Record<string, any>> = Omit<Partial<T
685
685
  table: MRT_TableInstance<TData>;
686
686
  values: Record<LiteralUnion<string & DeepKeys<TData>>, any>;
687
687
  }) => void;
688
- onColumnFilterFnsChange?: OnChangeFn<{
689
- [key: string]: MRT_FilterOption;
690
- }>;
691
688
  onDensityChange?: OnChangeFn<MRT_DensityState>;
692
689
  onDraggingColumnChange?: OnChangeFn<MRT_Column<TData> | null>;
693
690
  onDraggingRowChange?: OnChangeFn<MRT_Row<TData> | null>;
@@ -704,42 +701,33 @@ export type MRT_TableOptions<TData extends Record<string, any>> = Omit<Partial<T
704
701
  values: Record<LiteralUnion<string & DeepKeys<TData>>, any>;
705
702
  }) => Promise<void> | void;
706
703
  onGlobalFilterFnChange?: OnChangeFn<MRT_FilterOption>;
707
- onHoveredColumnChange?: OnChangeFn<MRT_Column<TData> | {
704
+ onHoveredColumnChange?: OnChangeFn<{
708
705
  id: string;
709
- } | null>;
710
- onHoveredRowChange?: OnChangeFn<MRT_Row<TData> | {
706
+ } | MRT_Column<TData> | null>;
707
+ onHoveredRowChange?: OnChangeFn<{
711
708
  id: string;
712
- } | null>;
709
+ } | MRT_Row<TData> | null>;
713
710
  onIsFullScreenChange?: OnChangeFn<boolean>;
714
711
  onShowAlertBannerChange?: OnChangeFn<boolean>;
715
712
  onShowColumnFiltersChange?: OnChangeFn<boolean>;
716
713
  onShowGlobalFilterChange?: OnChangeFn<boolean>;
717
714
  onShowToolbarDropZoneChange?: OnChangeFn<boolean>;
715
+ paginationDisplayMode?: 'custom' | 'default' | 'pages';
718
716
  positionActionsColumn?: 'first' | 'last';
719
717
  positionExpandColumn?: 'first' | 'last';
720
- positionGlobalFilter?: 'left' | 'right' | 'none';
721
- positionPagination?: 'bottom' | 'top' | 'both' | 'none';
722
- positionToolbarAlertBanner?: 'bottom' | 'top' | 'none';
723
- positionToolbarDropZone?: 'bottom' | 'top' | 'none' | 'both';
724
- renderBottomToolbar?: ReactNode | ((props: {
718
+ positionGlobalFilter?: 'left' | 'none' | 'right';
719
+ positionPagination?: 'both' | 'bottom' | 'none' | 'top';
720
+ positionToolbarAlertBanner?: 'bottom' | 'none' | 'top';
721
+ positionToolbarDropZone?: 'both' | 'bottom' | 'none' | 'top';
722
+ renderBottomToolbar?: ((props: {
725
723
  table: MRT_TableInstance<TData>;
726
- }) => ReactNode);
724
+ }) => ReactNode) | ReactNode;
727
725
  renderBottomToolbarCustomActions?: (props: {
728
726
  table: MRT_TableInstance<TData>;
729
727
  }) => ReactNode;
730
- renderCreateRowModalContent?: (props: {
731
- internalEditComponents: ReactNode[];
732
- row: MRT_Row<TData>;
733
- table: MRT_TableInstance<TData>;
734
- }) => ReactNode;
735
- renderEditRowModalContent?: (props: {
736
- internalEditComponents: ReactNode[];
737
- row: MRT_Row<TData>;
738
- table: MRT_TableInstance<TData>;
739
- }) => ReactNode;
740
728
  renderColumnActionsMenuItems?: (props: {
741
- column: MRT_Column<TData>;
742
729
  closeMenu: () => void;
730
+ column: MRT_Column<TData>;
743
731
  internalColumnMenuItems: ReactNode[];
744
732
  table: MRT_TableInstance<TData>;
745
733
  }) => ReactNode[];
@@ -749,18 +737,28 @@ export type MRT_TableOptions<TData extends Record<string, any>> = Omit<Partial<T
749
737
  onSelectFilterMode: (filterMode: MRT_FilterOption) => void;
750
738
  table: MRT_TableInstance<TData>;
751
739
  }) => ReactNode[];
740
+ renderCreateRowModalContent?: (props: {
741
+ internalEditComponents: ReactNode[];
742
+ row: MRT_Row<TData>;
743
+ table: MRT_TableInstance<TData>;
744
+ }) => ReactNode;
752
745
  renderDetailPanel?: (props: {
753
746
  row: MRT_Row<TData>;
754
747
  table: MRT_TableInstance<TData>;
755
748
  }) => ReactNode;
749
+ renderEditRowModalContent?: (props: {
750
+ internalEditComponents: ReactNode[];
751
+ row: MRT_Row<TData>;
752
+ table: MRT_TableInstance<TData>;
753
+ }) => ReactNode;
754
+ renderEmptyRowsFallback?: (props: {
755
+ table: MRT_TableInstance<TData>;
756
+ }) => ReactNode;
756
757
  renderGlobalFilterModeMenuItems?: (props: {
757
758
  internalFilterOptions: MRT_InternalFilterOption[];
758
759
  onSelectFilterMode: (filterMode: MRT_FilterOption) => void;
759
760
  table: MRT_TableInstance<TData>;
760
761
  }) => ReactNode[];
761
- renderEmptyRowsFallback?: (props: {
762
- table: MRT_TableInstance<TData>;
763
- }) => ReactNode;
764
762
  renderRowActionMenuItems?: (props: {
765
763
  closeMenu: () => void;
766
764
  row: MRT_Row<TData>;
@@ -774,19 +772,21 @@ export type MRT_TableOptions<TData extends Record<string, any>> = Omit<Partial<T
774
772
  renderToolbarInternalActions?: (props: {
775
773
  table: MRT_TableInstance<TData>;
776
774
  }) => ReactNode;
777
- renderTopToolbar?: ReactNode | ((props: {
775
+ renderTopToolbar?: ((props: {
778
776
  table: MRT_TableInstance<TData>;
779
- }) => ReactNode);
777
+ }) => ReactNode) | ReactNode;
780
778
  renderTopToolbarCustomActions?: (props: {
781
779
  table: MRT_TableInstance<TData>;
782
780
  }) => ReactNode;
783
781
  rowCount?: number;
784
782
  rowNumberMode?: 'original' | 'static';
783
+ rowPinningDisplayMode?: 'bottom' | 'select-bottom' | 'select-sticky' | 'select-top' | 'sticky' | 'top' | 'top-and-bottom';
785
784
  rowVirtualizerInstanceRef?: MutableRefObject<Virtualizer<HTMLDivElement, HTMLTableRowElement> | null>;
786
- rowVirtualizerOptions?: Partial<VirtualizerOptions<HTMLDivElement, HTMLTableRowElement>> | ((props: {
785
+ rowVirtualizerOptions?: ((props: {
787
786
  table: MRT_TableInstance<TData>;
788
- }) => Partial<VirtualizerOptions<HTMLDivElement, HTMLTableRowElement>>);
787
+ }) => Partial<VirtualizerOptions<HTMLDivElement, HTMLTableRowElement>>) | Partial<VirtualizerOptions<HTMLDivElement, HTMLTableRowElement>>;
789
788
  selectAllMode?: 'all' | 'page';
789
+ selectDisplayMode?: 'checkbox' | 'radio' | 'switch';
790
790
  /**
791
791
  * Manage state externally any way you want, then pass it back into MRT.
792
792
  */