material-react-table 2.0.0-rc.1 → 2.0.1

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 (130) hide show
  1. package/dist/index.d.ts +2 -2
  2. package/dist/index.esm.js +27 -21
  3. package/dist/index.esm.js.map +1 -1
  4. package/dist/index.js +27 -21
  5. package/dist/index.js.map +1 -1
  6. package/package.json +17 -17
  7. package/src/body/MRT_TableBodyCell.tsx +14 -11
  8. package/src/head/MRT_TableHeadCell.tsx +13 -9
  9. package/src/head/MRT_TableHeadCellResizeHandle.tsx +2 -1
  10. package/src/head/MRT_TableHeadRow.tsx +1 -1
  11. package/src/hooks/useMRT_TableOptions.ts +8 -8
  12. package/src/menus/MRT_RowActionMenu.tsx +12 -10
  13. package/src/table/MRT_Table.tsx +3 -1
  14. package/src/toolbar/MRT_TablePagination.tsx +2 -1
  15. package/src/types.ts +2 -2
  16. package/dist/types/MaterialReactTable.d.ts +0 -7
  17. package/dist/types/aggregationFns.d.ts +0 -11
  18. package/dist/types/body/MRT_TableBody.d.ts +0 -13
  19. package/dist/types/body/MRT_TableBodyCell.d.ts +0 -15
  20. package/dist/types/body/MRT_TableBodyCellValue.d.ts +0 -8
  21. package/dist/types/body/MRT_TableBodyRow.d.ts +0 -18
  22. package/dist/types/body/MRT_TableBodyRowGrabHandle.d.ts +0 -10
  23. package/dist/types/body/MRT_TableBodyRowPinButton.d.ts +0 -8
  24. package/dist/types/body/MRT_TableDetailPanel.d.ts +0 -13
  25. package/dist/types/body/index.d.ts +0 -7
  26. package/dist/types/buttons/MRT_ColumnPinningButtons.d.ts +0 -8
  27. package/dist/types/buttons/MRT_CopyButton.d.ts +0 -8
  28. package/dist/types/buttons/MRT_EditActionButtons.d.ts +0 -9
  29. package/dist/types/buttons/MRT_ExpandAllButton.d.ts +0 -7
  30. package/dist/types/buttons/MRT_ExpandButton.d.ts +0 -8
  31. package/dist/types/buttons/MRT_GrabHandleButton.d.ts +0 -12
  32. package/dist/types/buttons/MRT_RowPinButton.d.ts +0 -10
  33. package/dist/types/buttons/MRT_ShowHideColumnsButton.d.ts +0 -7
  34. package/dist/types/buttons/MRT_ToggleDensePaddingButton.d.ts +0 -7
  35. package/dist/types/buttons/MRT_ToggleFiltersButton.d.ts +0 -7
  36. package/dist/types/buttons/MRT_ToggleFullScreenButton.d.ts +0 -7
  37. package/dist/types/buttons/MRT_ToggleGlobalFilterButton.d.ts +0 -7
  38. package/dist/types/buttons/MRT_ToggleRowActionMenuButton.d.ts +0 -9
  39. package/dist/types/buttons/index.d.ts +0 -13
  40. package/dist/types/column.utils.d.ts +0 -127
  41. package/dist/types/filterFns.d.ts +0 -69
  42. package/dist/types/footer/MRT_TableFooter.d.ts +0 -11
  43. package/dist/types/footer/MRT_TableFooterCell.d.ts +0 -8
  44. package/dist/types/footer/MRT_TableFooterRow.d.ts +0 -12
  45. package/dist/types/footer/index.d.ts +0 -3
  46. package/dist/types/head/MRT_TableHead.d.ts +0 -11
  47. package/dist/types/head/MRT_TableHeadCell.d.ts +0 -8
  48. package/dist/types/head/MRT_TableHeadCellColumnActionsButton.d.ts +0 -8
  49. package/dist/types/head/MRT_TableHeadCellFilterContainer.d.ts +0 -8
  50. package/dist/types/head/MRT_TableHeadCellFilterLabel.d.ts +0 -8
  51. package/dist/types/head/MRT_TableHeadCellGrabHandle.d.ts +0 -10
  52. package/dist/types/head/MRT_TableHeadCellResizeHandle.d.ts +0 -8
  53. package/dist/types/head/MRT_TableHeadCellSortLabel.d.ts +0 -8
  54. package/dist/types/head/MRT_TableHeadRow.d.ts +0 -12
  55. package/dist/types/head/index.d.ts +0 -9
  56. package/dist/types/hooks/index.d.ts +0 -4
  57. package/dist/types/hooks/useMRT_DisplayColumns.d.ts +0 -9
  58. package/dist/types/hooks/useMRT_Effects.d.ts +0 -2
  59. package/dist/types/hooks/useMRT_TableInstance.d.ts +0 -2
  60. package/dist/types/hooks/useMRT_TableOptions.d.ts +0 -22
  61. package/dist/types/icons.d.ts +0 -36
  62. package/dist/types/index.d.ts +0 -18
  63. package/dist/types/inputs/MRT_EditCellTextField.d.ts +0 -8
  64. package/dist/types/inputs/MRT_FilterCheckbox.d.ts +0 -8
  65. package/dist/types/inputs/MRT_FilterRangeFields.d.ts +0 -8
  66. package/dist/types/inputs/MRT_FilterRangeSlider.d.ts +0 -8
  67. package/dist/types/inputs/MRT_FilterTextField.d.ts +0 -9
  68. package/dist/types/inputs/MRT_GlobalFilterTextField.d.ts +0 -7
  69. package/dist/types/inputs/MRT_SelectCheckbox.d.ts +0 -9
  70. package/dist/types/inputs/index.d.ts +0 -7
  71. package/dist/types/locales/ar.d.ts +0 -2
  72. package/dist/types/locales/az.d.ts +0 -2
  73. package/dist/types/locales/bg.d.ts +0 -2
  74. package/dist/types/locales/cs.d.ts +0 -2
  75. package/dist/types/locales/da.d.ts +0 -2
  76. package/dist/types/locales/de.d.ts +0 -2
  77. package/dist/types/locales/en.d.ts +0 -2
  78. package/dist/types/locales/es.d.ts +0 -2
  79. package/dist/types/locales/et.d.ts +0 -2
  80. package/dist/types/locales/fa.d.ts +0 -2
  81. package/dist/types/locales/fi.d.ts +0 -2
  82. package/dist/types/locales/fr.d.ts +0 -2
  83. package/dist/types/locales/hu.d.ts +0 -2
  84. package/dist/types/locales/hy.d.ts +0 -2
  85. package/dist/types/locales/id.d.ts +0 -2
  86. package/dist/types/locales/it.d.ts +0 -2
  87. package/dist/types/locales/ja.d.ts +0 -2
  88. package/dist/types/locales/ko.d.ts +0 -2
  89. package/dist/types/locales/nl.d.ts +0 -2
  90. package/dist/types/locales/no.d.ts +0 -2
  91. package/dist/types/locales/np.d.ts +0 -2
  92. package/dist/types/locales/pl.d.ts +0 -2
  93. package/dist/types/locales/pt-BR.d.ts +0 -2
  94. package/dist/types/locales/pt.d.ts +0 -2
  95. package/dist/types/locales/ro.d.ts +0 -2
  96. package/dist/types/locales/ru.d.ts +0 -2
  97. package/dist/types/locales/sk.d.ts +0 -2
  98. package/dist/types/locales/sr-Cyrl-RS.d.ts +0 -2
  99. package/dist/types/locales/sr-Latn-RS.d.ts +0 -2
  100. package/dist/types/locales/sv.d.ts +0 -2
  101. package/dist/types/locales/tr.d.ts +0 -2
  102. package/dist/types/locales/uk.d.ts +0 -2
  103. package/dist/types/locales/vi.d.ts +0 -2
  104. package/dist/types/locales/zh-Hans.d.ts +0 -2
  105. package/dist/types/locales/zh-Hant.d.ts +0 -2
  106. package/dist/types/menus/MRT_ColumnActionMenu.d.ts +0 -20
  107. package/dist/types/menus/MRT_FilterOptionMenu.d.ts +0 -13
  108. package/dist/types/menus/MRT_RowActionMenu.d.ts +0 -12
  109. package/dist/types/menus/MRT_ShowHideColumnsMenu.d.ts +0 -10
  110. package/dist/types/menus/MRT_ShowHideColumnsMenuItems.d.ts +0 -12
  111. package/dist/types/menus/index.d.ts +0 -5
  112. package/dist/types/modals/MRT_EditRowModal.d.ts +0 -8
  113. package/dist/types/modals/index.d.ts +0 -1
  114. package/dist/types/sortingFns.d.ts +0 -12
  115. package/dist/types/style.utils.d.ts +0 -32
  116. package/dist/types/table/MRT_Table.d.ts +0 -7
  117. package/dist/types/table/MRT_TableContainer.d.ts +0 -7
  118. package/dist/types/table/MRT_TableLoadingOverlay.d.ts +0 -7
  119. package/dist/types/table/MRT_TablePaper.d.ts +0 -7
  120. package/dist/types/table/index.d.ts +0 -5
  121. package/dist/types/toolbar/MRT_BottomToolbar.d.ts +0 -7
  122. package/dist/types/toolbar/MRT_LinearProgressBar.d.ts +0 -8
  123. package/dist/types/toolbar/MRT_TablePagination.d.ts +0 -11
  124. package/dist/types/toolbar/MRT_ToolbarAlertBanner.d.ts +0 -8
  125. package/dist/types/toolbar/MRT_ToolbarDropZone.d.ts +0 -7
  126. package/dist/types/toolbar/MRT_ToolbarInternalButtons.d.ts +0 -7
  127. package/dist/types/toolbar/MRT_TopToolbar.d.ts +0 -6
  128. package/dist/types/toolbar/index.d.ts +0 -7
  129. package/dist/types/types.d.ts +0 -844
  130. package/dist/types/useMaterialReactTable.d.ts +0 -2
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.0.0-rc.1",
2
+ "version": "2.0.1",
3
3
  "license": "MIT",
4
4
  "name": "material-react-table",
5
5
  "description": "A fully featured Material UI V5 implementation of TanStack React Table V8, written from the ground up in TypeScript.",
@@ -66,25 +66,25 @@
66
66
  "@emotion/react": "^11.11.1",
67
67
  "@emotion/styled": "^11.11.0",
68
68
  "@faker-js/faker": "^8.2.0",
69
- "@mui/icons-material": "^5.14.14",
70
- "@mui/material": "^5.14.14",
71
- "@mui/x-date-pickers": "^6.16.3",
69
+ "@mui/icons-material": "^5.14.16",
70
+ "@mui/material": "^5.14.16",
71
+ "@mui/x-date-pickers": "^6.17.0",
72
72
  "@rollup/plugin-typescript": "^11.1.5",
73
73
  "@size-limit/preset-small-lib": "^10.0.1",
74
- "@storybook/addon-a11y": "^7.5.1",
75
- "@storybook/addon-essentials": "^7.5.1",
76
- "@storybook/addon-interactions": "^7.5.1",
77
- "@storybook/addon-links": "^7.5.1",
78
- "@storybook/addon-storysource": "^7.5.1",
79
- "@storybook/blocks": "^7.5.1",
80
- "@storybook/react": "^7.5.1",
81
- "@storybook/react-vite": "^7.5.1",
74
+ "@storybook/addon-a11y": "^7.5.2",
75
+ "@storybook/addon-essentials": "^7.5.2",
76
+ "@storybook/addon-interactions": "^7.5.2",
77
+ "@storybook/addon-links": "^7.5.2",
78
+ "@storybook/addon-storysource": "^7.5.2",
79
+ "@storybook/blocks": "^7.5.2",
80
+ "@storybook/react": "^7.5.2",
81
+ "@storybook/react-vite": "^7.5.2",
82
82
  "@storybook/testing-library": "^0.2.2",
83
- "@types/node": "^20.8.8",
84
- "@types/react": "^18.2.31",
83
+ "@types/node": "^20.8.10",
84
+ "@types/react": "^18.2.33",
85
85
  "@types/react-dom": "^18.2.14",
86
- "@typescript-eslint/eslint-plugin": "^6.9.0",
87
- "@typescript-eslint/parser": "^6.9.0",
86
+ "@typescript-eslint/eslint-plugin": "^6.9.1",
87
+ "@typescript-eslint/parser": "^6.9.1",
88
88
  "@vitejs/plugin-react": "^4.1.0",
89
89
  "eslint": "^8.52.0",
90
90
  "eslint-plugin-mui-path-imports": "^0.0.15",
@@ -97,7 +97,7 @@
97
97
  "rollup-plugin-dts": "^6.1.0",
98
98
  "rollup-plugin-peer-deps-external": "^2.2.4",
99
99
  "size-limit": "^10.0.1",
100
- "storybook": "^7.5.1",
100
+ "storybook": "^7.5.2",
101
101
  "storybook-dark-mode": "^3.0.1",
102
102
  "tslib": "^2.6.2",
103
103
  "typescript": "^5.2.2",
@@ -50,6 +50,7 @@ export const MRT_TableBodyCell = <TData extends MRT_RowData>({
50
50
  const {
51
51
  getState,
52
52
  options: {
53
+ columnResizeMode,
53
54
  createDisplayMode,
54
55
  editDisplayMode,
55
56
  enableClickToCopy,
@@ -118,19 +119,21 @@ export const MRT_TableBodyCell = <TData extends MRT_RowData>({
118
119
  const isFirstColumn = getIsFirstColumn(column, table);
119
120
  const isLastColumn = getIsLastColumn(column, table);
120
121
  const isLastRow = numRows && rowIndex === numRows - 1;
122
+ const showResizeBorder =
123
+ columnSizingInfo.isResizingColumn === column.id &&
124
+ columnResizeMode === 'onChange';
121
125
 
122
- const borderStyle =
123
- columnSizingInfo.isResizingColumn === column.id
124
- ? `2px solid ${draggingBorderColor} !important`
125
- : isDraggingColumn || isDraggingRow
126
- ? `1px dashed ${theme.palette.grey[500]} !important`
127
- : isHoveredColumn ||
128
- isHoveredRow ||
129
- columnSizingInfo.isResizingColumn === column.id
130
- ? `2px dashed ${draggingBorderColor} !important`
131
- : undefined;
126
+ const borderStyle = showResizeBorder
127
+ ? `2px solid ${draggingBorderColor} !important`
128
+ : isDraggingColumn || isDraggingRow
129
+ ? `1px dashed ${theme.palette.grey[500]} !important`
130
+ : isHoveredColumn ||
131
+ isHoveredRow ||
132
+ columnSizingInfo.isResizingColumn === column.id
133
+ ? `2px dashed ${draggingBorderColor} !important`
134
+ : undefined;
132
135
 
133
- if (columnSizingInfo.isResizingColumn === column.id) {
136
+ if (showResizeBorder) {
134
137
  return { borderRight: borderStyle };
135
138
  }
136
139
 
@@ -32,6 +32,7 @@ export const MRT_TableHeadCell = <TData extends MRT_RowData>({
32
32
  getState,
33
33
  options: {
34
34
  columnFilterDisplayMode,
35
+ columnResizeMode,
35
36
  enableColumnActions,
36
37
  enableColumnDragging,
37
38
  enableColumnOrdering,
@@ -88,17 +89,20 @@ export const MRT_TableHeadCell = <TData extends MRT_RowData>({
88
89
  }, [showColumnActions, showDragHandle]);
89
90
 
90
91
  const draggingBorders = useMemo(() => {
91
- const borderStyle =
92
+ const showResizeBorder =
92
93
  columnSizingInfo.isResizingColumn === column.id &&
93
- !header.subHeaders.length
94
- ? `2px solid ${draggingBorderColor} !important`
95
- : draggingColumn?.id === column.id
96
- ? `1px dashed ${theme.palette.grey[500]}`
97
- : hoveredColumn?.id === column.id
98
- ? `2px dashed ${draggingBorderColor}`
99
- : undefined;
94
+ columnResizeMode === 'onChange' &&
95
+ !header.subHeaders.length;
100
96
 
101
- if (columnSizingInfo.isResizingColumn === column.id) {
97
+ const borderStyle = showResizeBorder
98
+ ? `2px solid ${draggingBorderColor} !important`
99
+ : draggingColumn?.id === column.id
100
+ ? `1px dashed ${theme.palette.grey[500]}`
101
+ : hoveredColumn?.id === column.id
102
+ ? `2px dashed ${draggingBorderColor}`
103
+ : undefined;
104
+
105
+ if (showResizeBorder) {
102
106
  return { borderRight: borderStyle };
103
107
  }
104
108
  const draggingBorders = borderStyle
@@ -46,7 +46,8 @@ export const MRT_TableHeadCellResizeHandle = <TData extends MRT_RowData>({
46
46
  sx={(theme) => ({
47
47
  '&:active > hr': {
48
48
  backgroundColor: theme.palette.info.main,
49
- opacity: header.subHeaders.length ? 1 : 0,
49
+ opacity:
50
+ header.subHeaders.length || columnResizeMode === 'onEnd' ? 1 : 0,
50
51
  },
51
52
  cursor: 'col-resize',
52
53
  mr:
@@ -36,7 +36,7 @@ export const MRT_TableHeadRow = <TData extends MRT_RowData>({
36
36
  headerGroup,
37
37
  table,
38
38
  }),
39
- rest,
39
+ ...rest,
40
40
  };
41
41
 
42
42
  return (
@@ -73,7 +73,7 @@ export const useMRT_TableOptions: <TData extends MRT_RowData>(
73
73
  enableTopToolbar = true,
74
74
  filterFns,
75
75
  icons,
76
- layoutMode = 'semantic',
76
+ layoutMode,
77
77
  localization,
78
78
  manualFiltering,
79
79
  manualGrouping,
@@ -118,13 +118,13 @@ export const useMRT_TableOptions: <TData extends MRT_RowData>(
118
118
  [defaultDisplayColumn],
119
119
  );
120
120
 
121
- if (layoutMode === 'semantic') {
122
- if (rest.enableRowVirtualization || rest.enableColumnVirtualization) {
123
- layoutMode = 'grid';
124
- }
125
- if (enableColumnResizing) {
126
- layoutMode = 'grid-no-grow';
127
- }
121
+ layoutMode =
122
+ layoutMode || (enableColumnResizing ? 'grid-no-grow' : 'semantic');
123
+ if (
124
+ layoutMode === 'semantic' &&
125
+ (rest.enableRowVirtualization || rest.enableColumnVirtualization)
126
+ ) {
127
+ layoutMode = 'grid';
128
128
  }
129
129
 
130
130
  if (rest.enableRowVirtualization) {
@@ -33,6 +33,7 @@ export const MRT_RowActionMenu = <TData extends MRT_RowData>({
33
33
  const {
34
34
  getState,
35
35
  options: {
36
+ editDisplayMode,
36
37
  enableEditing,
37
38
  icons: { EditIcon },
38
39
  localization,
@@ -52,16 +53,17 @@ export const MRT_RowActionMenu = <TData extends MRT_RowData>({
52
53
  open={!!anchorEl}
53
54
  {...rest}
54
55
  >
55
- {parseFromValuesOrFunc(enableEditing, row) && (
56
- <MenuItem onClick={handleEdit} sx={commonMenuItemStyles}>
57
- <Box sx={commonListItemStyles}>
58
- <ListItemIcon>
59
- <EditIcon />
60
- </ListItemIcon>
61
- {localization.edit}
62
- </Box>
63
- </MenuItem>
64
- )}
56
+ {parseFromValuesOrFunc(enableEditing, row) &&
57
+ ['modal', 'row'].includes(editDisplayMode!) && (
58
+ <MenuItem onClick={handleEdit} sx={commonMenuItemStyles}>
59
+ <Box sx={commonListItemStyles}>
60
+ <ListItemIcon>
61
+ <EditIcon />
62
+ </ListItemIcon>
63
+ {localization.edit}
64
+ </Box>
65
+ </MenuItem>
66
+ )}
65
67
  {renderRowActionMenuItems?.({
66
68
  closeMenu: () => setAnchorEl(null),
67
69
  row,
@@ -65,7 +65,9 @@ export const MRT_Table = <TData extends MRT_RowData>({
65
65
  const colSizes: { [key: string]: number } = {};
66
66
  for (let i = 0; i < headers.length; i++) {
67
67
  const header = headers[i];
68
- const colSize = header.getSize();
68
+ let colSize = header.getSize();
69
+ if (header.subHeaders?.length)
70
+ colSize = colSize * 1.05 + header.subHeaders.length * 2;
69
71
  colSizes[`--header-${parseCSSVarId(header.id)}-size`] = colSize;
70
72
  colSizes[`--col-${parseCSSVarId(header.column.id)}-size`] = colSize;
71
73
  }
@@ -135,7 +135,8 @@ export const MRT_TablePagination = <TData extends MRT_RowData>({
135
135
  <>
136
136
  <Typography
137
137
  align="center"
138
- sx={{ mb: 0, minWidth: '8ch', mx: '4px' }}
138
+ component="span"
139
+ sx={{ m: '0 4px', minWidth: '8ch' }}
139
140
  variant="body2"
140
141
  >{`${
141
142
  lastRowIndex === 0 ? 0 : (firstRowIndex + 1).toLocaleString()
package/src/types.ts CHANGED
@@ -714,7 +714,7 @@ export type MRT_TableOptions<TData extends MRT_RowData> = Omit<
714
714
  }) => Partial<VirtualizerOptions<HTMLDivElement, HTMLTableCellElement>>)
715
715
  | Partial<VirtualizerOptions<HTMLDivElement, HTMLTableCellElement>>;
716
716
  /**
717
- * The columns to display in the table. `accessorKey`s or `accessorFn`s must match keys in the `data` prop.
717
+ * The columns to display in the table. `accessorKey`s or `accessorFn`s must match keys in the `data` table option.
718
718
  *
719
719
  * See more info on creating columns on the official docs site:
720
720
  * @link https://www.material-react-table.com/docs/guides/data-columns
@@ -733,7 +733,7 @@ export type MRT_TableOptions<TData extends MRT_RowData> = Omit<
733
733
  */
734
734
  data: TData[];
735
735
  /**
736
- * Instead of specifying a bunch of the same options for each column, you can just change an option in the `defaultColumn` prop to change a default option for all columns.
736
+ * 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.
737
737
  */
738
738
  defaultColumn?: Partial<MRT_ColumnDef<TData>>;
739
739
  /**
@@ -1,7 +0,0 @@
1
- import { type MRT_RowData, type MRT_TableInstance, type MRT_TableOptions, type Xor } from './types';
2
- type TableInstanceProp<TData extends MRT_RowData> = {
3
- table: MRT_TableInstance<TData>;
4
- };
5
- type Props<TData extends MRT_RowData> = Xor<TableInstanceProp<TData>, MRT_TableOptions<TData>>;
6
- export declare const MaterialReactTable: <TData extends MRT_RowData>(props: Props<TData>) => import("react/jsx-runtime").JSX.Element;
7
- export {};
@@ -1,11 +0,0 @@
1
- export declare const MRT_AggregationFns: {
2
- sum: import("@tanstack/react-table").AggregationFn<any>;
3
- min: import("@tanstack/react-table").AggregationFn<any>;
4
- max: import("@tanstack/react-table").AggregationFn<any>;
5
- extent: import("@tanstack/react-table").AggregationFn<any>;
6
- mean: import("@tanstack/react-table").AggregationFn<any>;
7
- median: import("@tanstack/react-table").AggregationFn<any>;
8
- unique: import("@tanstack/react-table").AggregationFn<any>;
9
- uniqueCount: import("@tanstack/react-table").AggregationFn<any>;
10
- count: import("@tanstack/react-table").AggregationFn<any>;
11
- };
@@ -1,13 +0,0 @@
1
- import { type VirtualItem, type Virtualizer } from '@tanstack/react-virtual';
2
- import { type TableBodyProps } from '@mui/material/TableBody';
3
- import { type MRT_RowData, type MRT_TableInstance } from '../types';
4
- interface Props<TData extends MRT_RowData> extends TableBodyProps {
5
- columnVirtualizer?: Virtualizer<HTMLDivElement, HTMLTableCellElement>;
6
- table: MRT_TableInstance<TData>;
7
- virtualColumns?: VirtualItem[];
8
- virtualPaddingLeft?: number;
9
- virtualPaddingRight?: number;
10
- }
11
- export declare const MRT_TableBody: <TData extends MRT_RowData>({ columnVirtualizer, table, virtualColumns, virtualPaddingLeft, virtualPaddingRight, ...rest }: Props<TData>) => import("react/jsx-runtime").JSX.Element;
12
- export declare const Memo_MRT_TableBody: <TData extends MRT_RowData>({ columnVirtualizer, table, virtualColumns, virtualPaddingLeft, virtualPaddingRight, ...rest }: Props<TData>) => import("react/jsx-runtime").JSX.Element;
13
- export {};
@@ -1,15 +0,0 @@
1
- import { type RefObject } from 'react';
2
- import { type TableCellProps } from '@mui/material/TableCell';
3
- import { type MRT_Cell, type MRT_RowData, type MRT_TableInstance } from '../types';
4
- interface Props<TData extends MRT_RowData> extends TableCellProps {
5
- cell: MRT_Cell<TData>;
6
- measureElement?: (element: HTMLTableCellElement) => void;
7
- numRows?: number;
8
- rowIndex: number;
9
- rowRef: RefObject<HTMLTableRowElement>;
10
- table: MRT_TableInstance<TData>;
11
- virtualIndex?: number;
12
- }
13
- export declare const MRT_TableBodyCell: <TData extends MRT_RowData>({ cell, measureElement, numRows, rowIndex, rowRef, table, virtualIndex, ...rest }: Props<TData>) => import("react/jsx-runtime").JSX.Element;
14
- export declare const Memo_MRT_TableBodyCell: <TData extends MRT_RowData>({ cell, measureElement, numRows, rowIndex, rowRef, table, virtualIndex, ...rest }: Props<TData>) => import("react/jsx-runtime").JSX.Element;
15
- export {};
@@ -1,8 +0,0 @@
1
- import { type ReactNode } from 'react';
2
- import { type MRT_Cell, type MRT_RowData, type MRT_TableInstance } from '../types';
3
- interface Props<TData extends MRT_RowData> {
4
- cell: MRT_Cell<TData>;
5
- table: MRT_TableInstance<TData>;
6
- }
7
- export declare const MRT_TableBodyCellValue: <TData extends MRT_RowData>({ cell, table, }: Props<TData>) => ReactNode;
8
- export {};
@@ -1,18 +0,0 @@
1
- import { type VirtualItem, type Virtualizer } from '@tanstack/react-virtual';
2
- import { type MRT_Row, type MRT_RowData, type MRT_TableInstance } from '../types';
3
- interface Props<TData extends MRT_RowData> {
4
- columnVirtualizer?: Virtualizer<HTMLDivElement, HTMLTableCellElement>;
5
- measureElement?: (element: HTMLTableRowElement) => void;
6
- numRows?: number;
7
- pinnedRowIds?: string[];
8
- row: MRT_Row<TData>;
9
- rowIndex: number;
10
- table: MRT_TableInstance<TData>;
11
- virtualColumns?: VirtualItem[];
12
- virtualPaddingLeft?: number;
13
- virtualPaddingRight?: number;
14
- virtualRow?: VirtualItem;
15
- }
16
- export declare const MRT_TableBodyRow: <TData extends MRT_RowData>({ columnVirtualizer, measureElement, numRows, pinnedRowIds, row, rowIndex, table, virtualColumns, virtualPaddingLeft, virtualPaddingRight, virtualRow, }: Props<TData>) => import("react/jsx-runtime").JSX.Element;
17
- export declare const Memo_MRT_TableBodyRow: <TData extends MRT_RowData>({ columnVirtualizer, measureElement, numRows, pinnedRowIds, row, rowIndex, table, virtualColumns, virtualPaddingLeft, virtualPaddingRight, virtualRow, }: Props<TData>) => import("react/jsx-runtime").JSX.Element;
18
- export {};
@@ -1,10 +0,0 @@
1
- import { type RefObject } from 'react';
2
- import { type IconButtonProps } from '@mui/material/IconButton';
3
- import { type MRT_Row, type MRT_RowData, type MRT_TableInstance } from '../types';
4
- interface Props<TData extends MRT_RowData> extends IconButtonProps {
5
- row: MRT_Row<TData>;
6
- rowRef: RefObject<HTMLTableRowElement>;
7
- table: MRT_TableInstance<TData>;
8
- }
9
- export declare const MRT_TableBodyRowGrabHandle: <TData extends MRT_RowData>({ row, rowRef, table, ...rest }: Props<TData>) => import("react/jsx-runtime").JSX.Element;
10
- export {};
@@ -1,8 +0,0 @@
1
- import { type IconButtonProps } from '@mui/material/IconButton';
2
- import { type MRT_Row, type MRT_RowData, type MRT_TableInstance } from '../types';
3
- interface Props<TData extends MRT_RowData> extends IconButtonProps {
4
- row: MRT_Row<TData>;
5
- table: MRT_TableInstance<TData>;
6
- }
7
- export declare const MRT_TableBodyRowPinButton: <TData extends MRT_RowData>({ row, table, ...rest }: Props<TData>) => import("react/jsx-runtime").JSX.Element | null;
8
- export {};
@@ -1,13 +0,0 @@
1
- import { type RefObject } from 'react';
2
- import { type VirtualItem } from '@tanstack/react-virtual';
3
- import { type TableCellProps } from '@mui/material/TableCell';
4
- import { type MRT_Row, type MRT_RowData, type MRT_TableInstance } from '../types';
5
- interface Props<TData extends MRT_RowData> extends TableCellProps {
6
- parentRowRef: RefObject<HTMLTableRowElement>;
7
- row: MRT_Row<TData>;
8
- rowIndex: number;
9
- table: MRT_TableInstance<TData>;
10
- virtualRow?: VirtualItem;
11
- }
12
- export declare const MRT_TableDetailPanel: <TData extends MRT_RowData>({ parentRowRef, row, rowIndex, table, virtualRow, ...rest }: Props<TData>) => import("react/jsx-runtime").JSX.Element;
13
- export {};
@@ -1,7 +0,0 @@
1
- export * from './MRT_TableBody';
2
- export * from './MRT_TableBodyCell';
3
- export * from './MRT_TableBodyCellValue';
4
- export * from './MRT_TableBodyRow';
5
- export * from './MRT_TableBodyRowGrabHandle';
6
- export * from './MRT_TableBodyRowPinButton';
7
- export * from './MRT_TableDetailPanel';
@@ -1,8 +0,0 @@
1
- import { type BoxProps } from '@mui/material/Box';
2
- import { type MRT_Column, type MRT_RowData, type MRT_TableInstance } from '../types';
3
- interface Props<TData extends MRT_RowData> extends BoxProps {
4
- column: MRT_Column<TData>;
5
- table: MRT_TableInstance<TData>;
6
- }
7
- export declare const MRT_ColumnPinningButtons: <TData extends MRT_RowData>({ column, table, ...rest }: Props<TData>) => import("react/jsx-runtime").JSX.Element;
8
- export {};
@@ -1,8 +0,0 @@
1
- import { type ButtonProps } from '@mui/material/Button';
2
- import { type MRT_Cell, type MRT_RowData, type MRT_TableInstance } from '../types';
3
- interface Props<TData extends MRT_RowData> extends ButtonProps {
4
- cell: MRT_Cell<TData>;
5
- table: MRT_TableInstance<TData>;
6
- }
7
- export declare const MRT_CopyButton: <TData extends MRT_RowData>({ cell, table, ...rest }: Props<TData>) => import("react/jsx-runtime").JSX.Element;
8
- export {};
@@ -1,9 +0,0 @@
1
- import { type BoxProps } from '@mui/material/Box';
2
- import { type MRT_Row, type MRT_RowData, type MRT_TableInstance } from '../types';
3
- interface Props<TData extends MRT_RowData> extends BoxProps {
4
- row: MRT_Row<TData>;
5
- table: MRT_TableInstance<TData>;
6
- variant?: 'icon' | 'text';
7
- }
8
- export declare const MRT_EditActionButtons: <TData extends MRT_RowData>({ row, table, variant, ...rest }: Props<TData>) => import("react/jsx-runtime").JSX.Element;
9
- export {};
@@ -1,7 +0,0 @@
1
- import { type IconButtonProps } from '@mui/material/IconButton';
2
- import { type MRT_RowData, type MRT_TableInstance } from '../types';
3
- interface Props<TData extends MRT_RowData> extends IconButtonProps {
4
- table: MRT_TableInstance<TData>;
5
- }
6
- export declare const MRT_ExpandAllButton: <TData extends MRT_RowData>({ table, ...rest }: Props<TData>) => import("react/jsx-runtime").JSX.Element;
7
- export {};
@@ -1,8 +0,0 @@
1
- import { type IconButtonProps } from '@mui/material/IconButton';
2
- import { type MRT_Row, type MRT_RowData, type MRT_TableInstance } from '../types';
3
- interface Props<TData extends MRT_RowData> extends IconButtonProps {
4
- row: MRT_Row<TData>;
5
- table: MRT_TableInstance<TData>;
6
- }
7
- export declare const MRT_ExpandButton: <TData extends MRT_RowData>({ row, table, }: Props<TData>) => import("react/jsx-runtime").JSX.Element;
8
- export {};
@@ -1,12 +0,0 @@
1
- import { type DragEventHandler } from 'react';
2
- import { type IconButtonProps } from '@mui/material/IconButton';
3
- import { type MRT_RowData, type MRT_TableInstance } from '../types';
4
- interface Props<TData extends MRT_RowData> extends IconButtonProps {
5
- iconButtonProps?: IconButtonProps;
6
- location?: 'column' | 'row';
7
- onDragEnd: DragEventHandler<HTMLButtonElement>;
8
- onDragStart: DragEventHandler<HTMLButtonElement>;
9
- table: MRT_TableInstance<TData>;
10
- }
11
- export declare const MRT_GrabHandleButton: <TData extends MRT_RowData>({ iconButtonProps, location, onDragEnd, onDragStart, table, ...rest }: Props<TData>) => import("react/jsx-runtime").JSX.Element;
12
- export {};
@@ -1,10 +0,0 @@
1
- import { type RowPinningPosition } from '@tanstack/react-table';
2
- import { type IconButtonProps } from '@mui/material/IconButton';
3
- import { type MRT_Row, type MRT_RowData, type MRT_TableInstance } from '../types';
4
- interface Props<TData extends MRT_RowData> extends IconButtonProps {
5
- pinningPosition: RowPinningPosition;
6
- row: MRT_Row<TData>;
7
- table: MRT_TableInstance<TData>;
8
- }
9
- export declare const MRT_RowPinButton: <TData extends MRT_RowData>({ pinningPosition, row, table, ...rest }: Props<TData>) => import("react/jsx-runtime").JSX.Element;
10
- export {};
@@ -1,7 +0,0 @@
1
- import { type IconButtonProps } from '@mui/material/IconButton';
2
- import { type MRT_RowData, type MRT_TableInstance } from '../types';
3
- interface Props<TData extends MRT_RowData> extends IconButtonProps {
4
- table: MRT_TableInstance<TData>;
5
- }
6
- export declare const MRT_ShowHideColumnsButton: <TData extends MRT_RowData>({ table, ...rest }: Props<TData>) => import("react/jsx-runtime").JSX.Element;
7
- export {};
@@ -1,7 +0,0 @@
1
- import { type IconButtonProps } from '@mui/material/IconButton';
2
- import { type MRT_RowData, type MRT_TableInstance } from '../types';
3
- interface Props<TData extends MRT_RowData> extends IconButtonProps {
4
- table: MRT_TableInstance<TData>;
5
- }
6
- export declare const MRT_ToggleDensePaddingButton: <TData extends MRT_RowData>({ table, ...rest }: Props<TData>) => import("react/jsx-runtime").JSX.Element;
7
- export {};
@@ -1,7 +0,0 @@
1
- import { type IconButtonProps } from '@mui/material/IconButton';
2
- import { type MRT_RowData, type MRT_TableInstance } from '../types';
3
- interface Props<TData extends MRT_RowData> extends IconButtonProps {
4
- table: MRT_TableInstance<TData>;
5
- }
6
- export declare const MRT_ToggleFiltersButton: <TData extends MRT_RowData>({ table, ...rest }: Props<TData>) => import("react/jsx-runtime").JSX.Element;
7
- export {};
@@ -1,7 +0,0 @@
1
- import { type IconButtonProps } from '@mui/material/IconButton';
2
- import { type MRT_RowData, type MRT_TableInstance } from '../types';
3
- interface Props<TData extends MRT_RowData> extends IconButtonProps {
4
- table: MRT_TableInstance<TData>;
5
- }
6
- export declare const MRT_ToggleFullScreenButton: <TData extends MRT_RowData>({ table, ...rest }: Props<TData>) => import("react/jsx-runtime").JSX.Element;
7
- export {};
@@ -1,7 +0,0 @@
1
- import { type IconButtonProps } from '@mui/material/IconButton';
2
- import { type MRT_RowData, type MRT_TableInstance } from '../types';
3
- interface Props<TData extends MRT_RowData> extends IconButtonProps {
4
- table: MRT_TableInstance<TData>;
5
- }
6
- export declare const MRT_ToggleGlobalFilterButton: <TData extends MRT_RowData>({ table, ...rest }: Props<TData>) => import("react/jsx-runtime").JSX.Element;
7
- export {};
@@ -1,9 +0,0 @@
1
- import { type IconButtonProps } from '@mui/material/IconButton';
2
- import { type MRT_Cell, type MRT_Row, type MRT_RowData, type MRT_TableInstance } from '../types';
3
- interface Props<TData extends MRT_RowData> extends IconButtonProps {
4
- cell: MRT_Cell<TData>;
5
- row: MRT_Row<TData>;
6
- table: MRT_TableInstance<TData>;
7
- }
8
- export declare const MRT_ToggleRowActionMenuButton: <TData extends MRT_RowData>({ cell, row, table, ...rest }: Props<TData>) => import("react/jsx-runtime").JSX.Element;
9
- export {};
@@ -1,13 +0,0 @@
1
- export * from './MRT_ColumnPinningButtons';
2
- export * from './MRT_CopyButton';
3
- export * from './MRT_EditActionButtons';
4
- export * from './MRT_ExpandAllButton';
5
- export * from './MRT_ExpandButton';
6
- export * from './MRT_GrabHandleButton';
7
- export * from './MRT_RowPinButton';
8
- export * from './MRT_ShowHideColumnsButton';
9
- export * from './MRT_ToggleDensePaddingButton';
10
- export * from './MRT_ToggleFiltersButton';
11
- export * from './MRT_ToggleFullScreenButton';
12
- export * from './MRT_ToggleGlobalFilterButton';
13
- export * from './MRT_ToggleRowActionMenuButton';