material-react-table 0.33.6 → 0.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/MaterialReactTable.d.ts +45 -53
- package/dist/cjs/buttons/MRT_ColumnPinningButtons.d.ts +4 -5
- package/dist/cjs/buttons/MRT_FullScreenToggleButton.d.ts +3 -4
- package/dist/cjs/buttons/MRT_GrabHandleButton.d.ts +4 -4
- package/dist/cjs/buttons/MRT_ShowHideColumnsButton.d.ts +3 -4
- package/dist/cjs/buttons/MRT_ToggleDensePaddingButton.d.ts +3 -4
- package/dist/cjs/buttons/MRT_ToggleFiltersButton.d.ts +3 -4
- package/dist/cjs/buttons/MRT_ToggleGlobalFilterButton.d.ts +3 -4
- package/dist/cjs/index.d.ts +8 -2
- package/dist/cjs/index.js +651 -140
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/inputs/MRT_GlobalFilterTextField.d.ts +3 -4
- package/dist/cjs/menus/MRT_FilterOptionMenu.d.ts +3 -4
- package/dist/cjs/menus/MRT_ShowHideColumnsMenu.d.ts +3 -4
- package/dist/cjs/menus/MRT_ShowHideColumnsMenuItems.d.ts +8 -8
- package/dist/cjs/table/MRT_TableRoot.d.ts +0 -1
- package/dist/cjs/toolbar/MRT_ToolbarInternalButtons.d.ts +1 -1
- package/dist/esm/MaterialReactTable.d.ts +45 -53
- package/dist/esm/buttons/MRT_ColumnPinningButtons.d.ts +4 -5
- package/dist/esm/buttons/MRT_FullScreenToggleButton.d.ts +3 -4
- package/dist/esm/buttons/MRT_GrabHandleButton.d.ts +4 -4
- package/dist/esm/buttons/MRT_ShowHideColumnsButton.d.ts +3 -4
- package/dist/esm/buttons/MRT_ToggleDensePaddingButton.d.ts +3 -4
- package/dist/esm/buttons/MRT_ToggleFiltersButton.d.ts +3 -4
- package/dist/esm/buttons/MRT_ToggleGlobalFilterButton.d.ts +3 -4
- package/dist/esm/index.d.ts +8 -2
- package/dist/esm/inputs/MRT_GlobalFilterTextField.d.ts +3 -4
- package/dist/esm/material-react-table.esm.js +644 -141
- package/dist/esm/material-react-table.esm.js.map +1 -1
- package/dist/esm/menus/MRT_FilterOptionMenu.d.ts +3 -4
- package/dist/esm/menus/MRT_ShowHideColumnsMenu.d.ts +3 -4
- package/dist/esm/menus/MRT_ShowHideColumnsMenuItems.d.ts +8 -8
- package/dist/esm/table/MRT_TableRoot.d.ts +0 -1
- package/dist/esm/toolbar/MRT_ToolbarInternalButtons.d.ts +1 -1
- package/dist/index.d.ts +76 -54
- package/package.json +5 -5
- package/src/MaterialReactTable.tsx +49 -50
- package/src/body/MRT_TableBody.tsx +30 -11
- package/src/body/MRT_TableBodyCell.tsx +17 -18
- package/src/body/MRT_TableBodyRow.tsx +7 -10
- package/src/body/MRT_TableBodyRowGrabHandle.tsx +5 -5
- package/src/buttons/MRT_ColumnPinningButtons.tsx +10 -5
- package/src/buttons/MRT_EditActionButtons.tsx +10 -6
- package/src/buttons/MRT_FullScreenToggleButton.tsx +10 -4
- package/src/buttons/MRT_GrabHandleButton.tsx +5 -5
- package/src/buttons/MRT_ShowHideColumnsButton.tsx +10 -4
- package/src/buttons/MRT_ToggleDensePaddingButton.tsx +10 -4
- package/src/buttons/MRT_ToggleFiltersButton.tsx +10 -4
- package/src/buttons/MRT_ToggleGlobalFilterButton.tsx +10 -4
- package/src/buttons/MRT_ToggleRowActionMenuButton.tsx +4 -4
- package/src/head/MRT_TableHeadCell.tsx +11 -16
- package/src/head/MRT_TableHeadCellGrabHandle.tsx +11 -12
- package/src/index.tsx +17 -3
- package/src/inputs/MRT_EditCellTextField.tsx +13 -13
- package/src/inputs/MRT_GlobalFilterTextField.tsx +8 -10
- package/src/menus/MRT_FilterOptionMenu.tsx +5 -5
- package/src/menus/MRT_ShowHideColumnsMenu.tsx +13 -10
- package/src/menus/MRT_ShowHideColumnsMenuItems.tsx +24 -22
- package/src/table/MRT_TableRoot.tsx +59 -66
- package/src/toolbar/MRT_ToolbarDropZone.tsx +6 -10
- package/src/toolbar/MRT_ToolbarInternalButtons.tsx +2 -7
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
1
|
import { MRT_TableInstance } from '..';
|
|
3
|
-
interface Props {
|
|
4
|
-
table: MRT_TableInstance
|
|
2
|
+
interface Props<TData extends Record<string, any> = {}> {
|
|
3
|
+
table: MRT_TableInstance<TData>;
|
|
5
4
|
}
|
|
6
|
-
export declare const MRT_GlobalFilterTextField:
|
|
5
|
+
export declare const MRT_GlobalFilterTextField: <TData extends Record<string, any> = {}>({ table, }: Props<TData>) => JSX.Element;
|
|
7
6
|
export {};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
1
|
import type { MRT_Header, MRT_TableInstance } from '..';
|
|
3
2
|
import { MRT_Localization } from '../localization';
|
|
4
3
|
export declare const internalFilterOptions: (localization: MRT_Localization) => {
|
|
@@ -7,12 +6,12 @@ export declare const internalFilterOptions: (localization: MRT_Localization) =>
|
|
|
7
6
|
label: string;
|
|
8
7
|
divider: boolean;
|
|
9
8
|
}[];
|
|
10
|
-
interface Props {
|
|
9
|
+
interface Props<TData extends Record<string, any> = {}> {
|
|
11
10
|
anchorEl: HTMLElement | null;
|
|
12
11
|
header?: MRT_Header;
|
|
13
12
|
onSelect?: () => void;
|
|
14
13
|
setAnchorEl: (anchorEl: HTMLElement | null) => void;
|
|
15
|
-
table: MRT_TableInstance
|
|
14
|
+
table: MRT_TableInstance<TData>;
|
|
16
15
|
}
|
|
17
|
-
export declare const MRT_FilterOptionMenu:
|
|
16
|
+
export declare const MRT_FilterOptionMenu: <TData extends Record<string, any> = {}>({ anchorEl, header, onSelect, setAnchorEl, table, }: Props<TData>) => JSX.Element;
|
|
18
17
|
export {};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
1
|
import type { MRT_TableInstance } from '..';
|
|
3
|
-
interface Props {
|
|
2
|
+
interface Props<TData extends Record<string, any> = {}> {
|
|
4
3
|
anchorEl: HTMLElement | null;
|
|
5
4
|
isSubMenu?: boolean;
|
|
6
5
|
setAnchorEl: (anchorEl: HTMLElement | null) => void;
|
|
7
|
-
table: MRT_TableInstance
|
|
6
|
+
table: MRT_TableInstance<TData>;
|
|
8
7
|
}
|
|
9
|
-
export declare const MRT_ShowHideColumnsMenu:
|
|
8
|
+
export declare const MRT_ShowHideColumnsMenu: <TData extends Record<string, any> = {}>({ anchorEl, isSubMenu, setAnchorEl, table, }: Props<TData>) => JSX.Element;
|
|
10
9
|
export {};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Dispatch,
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
2
|
import type { MRT_Column, MRT_TableInstance } from '..';
|
|
3
|
-
interface Props {
|
|
4
|
-
allColumns: MRT_Column[];
|
|
5
|
-
column: MRT_Column
|
|
6
|
-
|
|
3
|
+
interface Props<TData extends Record<string, any> = {}> {
|
|
4
|
+
allColumns: MRT_Column<TData>[];
|
|
5
|
+
column: MRT_Column<TData>;
|
|
6
|
+
hoveredColumn: MRT_Column<TData> | null;
|
|
7
7
|
isSubMenu?: boolean;
|
|
8
|
-
|
|
9
|
-
table: MRT_TableInstance
|
|
8
|
+
setHoveredColumn: Dispatch<SetStateAction<MRT_Column<TData> | null>>;
|
|
9
|
+
table: MRT_TableInstance<TData>;
|
|
10
10
|
}
|
|
11
|
-
export declare const MRT_ShowHideColumnsMenuItems:
|
|
11
|
+
export declare const MRT_ShowHideColumnsMenuItems: <TData extends Record<string, any> = {}>({ allColumns, hoveredColumn, setHoveredColumn, column, isSubMenu, table, }: Props<TData>) => JSX.Element;
|
|
12
12
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ChangeEvent, Dispatch, DragEvent,
|
|
1
|
+
import { ChangeEvent, Dispatch, DragEvent, FocusEvent, ReactNode, SetStateAction } from 'react';
|
|
2
2
|
import type { AlertProps, ButtonProps, CheckboxProps, IconButtonProps, LinearProgressProps, PaperProps, SkeletonProps, TableBodyProps, TableCellProps, TableContainerProps, TableFooterProps, TableHeadProps, TablePaginationProps, TableProps, TableRowProps, TextFieldProps, ToolbarProps } from '@mui/material';
|
|
3
3
|
import type { Cell, Column, ColumnDef, DeepKeys, FilterFn, Header, HeaderGroup, OnChangeFn, Row, SortingFn, Table, TableOptions, TableState } from '@tanstack/react-table';
|
|
4
|
-
import type { VirtualizerOptions } from '
|
|
4
|
+
import type { Options as VirtualizerOptions } from 'react-virtual';
|
|
5
5
|
import { MRT_Icons } from './icons';
|
|
6
6
|
import { MRT_FilterFns } from './filterFns';
|
|
7
7
|
import { MRT_Localization } from './localization';
|
|
@@ -35,40 +35,40 @@ export declare type MRT_TableInstance<TData extends Record<string, any> = {}> =
|
|
|
35
35
|
tableId: string;
|
|
36
36
|
localization: MRT_Localization;
|
|
37
37
|
};
|
|
38
|
-
setCurrentDraggingColumn: Dispatch<SetStateAction<MRT_Column<TData> | null>>;
|
|
39
|
-
setCurrentDraggingRow: Dispatch<SetStateAction<MRT_Row<TData> | null>>;
|
|
40
|
-
setCurrentEditingCell: Dispatch<SetStateAction<MRT_Cell | null>>;
|
|
41
|
-
setCurrentEditingRow: Dispatch<SetStateAction<MRT_Row | null>>;
|
|
42
38
|
setColumnFilterFns: Dispatch<SetStateAction<{
|
|
43
39
|
[key: string]: MRT_FilterOption;
|
|
44
40
|
}>>;
|
|
41
|
+
setDensity: Dispatch<SetStateAction<'comfortable' | 'compact' | 'spacious'>>;
|
|
42
|
+
setDraggingColumn: Dispatch<SetStateAction<MRT_Column<TData> | null>>;
|
|
43
|
+
setDraggingRow: Dispatch<SetStateAction<MRT_Row<TData> | null>>;
|
|
44
|
+
setEditingCell: Dispatch<SetStateAction<MRT_Cell | null>>;
|
|
45
|
+
setEditingRow: Dispatch<SetStateAction<MRT_Row | null>>;
|
|
45
46
|
setGlobalFilterFn: Dispatch<SetStateAction<MRT_FilterOption>>;
|
|
46
|
-
|
|
47
|
+
setHoveredColumn: Dispatch<SetStateAction<MRT_Column<TData> | {
|
|
47
48
|
id: string;
|
|
48
49
|
} | null>>;
|
|
49
|
-
|
|
50
|
+
setHoveredRow: Dispatch<SetStateAction<MRT_Row<TData> | {
|
|
50
51
|
id: string;
|
|
51
52
|
} | null>>;
|
|
52
|
-
setDensity: Dispatch<SetStateAction<'comfortable' | 'compact' | 'spacious'>>;
|
|
53
53
|
setIsFullScreen: Dispatch<SetStateAction<boolean>>;
|
|
54
54
|
setShowAlertBanner: Dispatch<SetStateAction<boolean>>;
|
|
55
55
|
setShowFilters: Dispatch<SetStateAction<boolean>>;
|
|
56
56
|
setShowGlobalFilter: Dispatch<SetStateAction<boolean>>;
|
|
57
57
|
};
|
|
58
58
|
export declare type MRT_TableState<TData extends Record<string, any> = {}> = TableState & {
|
|
59
|
-
currentDraggingColumn: MRT_Column<TData> | null;
|
|
60
|
-
currentDraggingRow: MRT_Row<TData> | null;
|
|
61
|
-
currentEditingCell: MRT_Cell<TData> | null;
|
|
62
|
-
currentEditingRow: MRT_Row<TData> | null;
|
|
63
59
|
columnFilterFns: Record<string, MRT_FilterOption>;
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
density: 'comfortable' | 'compact' | 'spacious';
|
|
61
|
+
draggingColumn: MRT_Column<TData> | null;
|
|
62
|
+
draggingRow: MRT_Row<TData> | null;
|
|
63
|
+
editingCell: MRT_Cell<TData> | null;
|
|
64
|
+
editingRow: MRT_Row<TData> | null;
|
|
65
|
+
globalFilterFn: MRT_FilterOption;
|
|
66
|
+
hoveredColumn: MRT_Column<TData> | {
|
|
66
67
|
id: string;
|
|
67
68
|
} | null;
|
|
68
|
-
|
|
69
|
+
hoveredRow: MRT_Row<TData> | {
|
|
69
70
|
id: string;
|
|
70
71
|
} | null;
|
|
71
|
-
density: 'comfortable' | 'compact' | 'spacious';
|
|
72
72
|
isFullScreen: boolean;
|
|
73
73
|
isLoading: boolean;
|
|
74
74
|
showAlertBanner: boolean;
|
|
@@ -198,15 +198,17 @@ export declare type MRT_ColumnDef<TData extends Record<string, any> = {}> = Omit
|
|
|
198
198
|
table: MRT_TableInstance<TData>;
|
|
199
199
|
column: MRT_Column<TData>;
|
|
200
200
|
}) => TableCellProps);
|
|
201
|
-
onCellEditBlur?: ({ cell, event, table, }: {
|
|
201
|
+
onCellEditBlur?: ({ cell, event, table, value, }: {
|
|
202
202
|
event: FocusEvent<HTMLInputElement>;
|
|
203
203
|
cell: MRT_Cell<TData>;
|
|
204
204
|
table: MRT_TableInstance<TData>;
|
|
205
|
+
value: string;
|
|
205
206
|
}) => void;
|
|
206
|
-
onCellEditChange?: ({ cell, event, table, }: {
|
|
207
|
+
onCellEditChange?: ({ cell, event, table, value, }: {
|
|
207
208
|
event: ChangeEvent<HTMLInputElement>;
|
|
208
209
|
cell: MRT_Cell<TData>;
|
|
209
210
|
table: MRT_TableInstance<TData>;
|
|
211
|
+
value: string;
|
|
210
212
|
}) => void;
|
|
211
213
|
sortingFn?: MRT_SortingFn;
|
|
212
214
|
};
|
|
@@ -231,7 +233,7 @@ export declare type MRT_Row<TData extends Record<string, any> = {}> = Omit<Row<T
|
|
|
231
233
|
getAllCells: () => MRT_Cell<TData>[];
|
|
232
234
|
getVisibleCells: () => MRT_Cell<TData>[];
|
|
233
235
|
subRows?: MRT_Row<TData>[];
|
|
234
|
-
_valuesCache
|
|
236
|
+
_valuesCache: Record<LiteralUnion<string & DeepKeys<TData>>, any>;
|
|
235
237
|
};
|
|
236
238
|
export declare type MRT_Cell<TData extends Record<string, any> = {}> = Omit<Cell<TData, unknown>, 'column' | 'row'> & {
|
|
237
239
|
column: MRT_Column<TData>;
|
|
@@ -251,10 +253,11 @@ export declare type MRT_DisplayColumnIds = 'mrt-row-drag' | 'mrt-row-actions' |
|
|
|
251
253
|
* See the full props list on the official docs site:
|
|
252
254
|
* @link https://www.material-react-table.com/docs/api/props
|
|
253
255
|
*/
|
|
254
|
-
export declare type MaterialReactTableProps<TData extends Record<string, any> = {}> = Omit<Partial<TableOptions<TData>>, 'columns' | 'data' | 'expandRowsFn' | 'initialState' | 'onStateChange' | 'state'> & {
|
|
256
|
+
export declare type MaterialReactTableProps<TData extends Record<string, any> = {}> = Omit<Partial<TableOptions<TData>>, 'columns' | 'data' | 'defaultColumn' | 'enableRowSelection' | 'expandRowsFn' | 'initialState' | 'onStateChange' | 'state'> & {
|
|
255
257
|
columnFilterModeOptions?: (MRT_FilterOption | string)[] | null;
|
|
256
258
|
columns: MRT_ColumnDef<TData>[];
|
|
257
259
|
data: TData[];
|
|
260
|
+
defaultColumn?: Partial<MRT_ColumnDef<TData>>;
|
|
258
261
|
displayColumnDefOptions?: Partial<{
|
|
259
262
|
[key in MRT_DisplayColumnIds]: Partial<MRT_ColumnDef>;
|
|
260
263
|
}>;
|
|
@@ -276,6 +279,7 @@ export declare type MaterialReactTableProps<TData extends Record<string, any> =
|
|
|
276
279
|
enableRowDragging?: boolean;
|
|
277
280
|
enableRowNumbers?: boolean;
|
|
278
281
|
enableRowOrdering?: boolean;
|
|
282
|
+
enableRowSelection?: boolean | ((row: MRT_Row<TData>) => boolean);
|
|
279
283
|
enableRowVirtualization?: boolean;
|
|
280
284
|
enableSelectAll?: boolean;
|
|
281
285
|
enableStickyHeader?: boolean;
|
|
@@ -396,15 +400,17 @@ export declare type MaterialReactTableProps<TData extends Record<string, any> =
|
|
|
396
400
|
muiTableTopToolbarProps?: ToolbarProps | (({ table }: {
|
|
397
401
|
table: MRT_TableInstance<TData>;
|
|
398
402
|
}) => ToolbarProps);
|
|
399
|
-
onCellEditBlur?: ({ cell, event, table, }: {
|
|
403
|
+
onCellEditBlur?: ({ cell, event, table, value, }: {
|
|
400
404
|
event: FocusEvent<HTMLInputElement>;
|
|
401
405
|
cell: MRT_Cell<TData>;
|
|
402
406
|
table: MRT_TableInstance<TData>;
|
|
407
|
+
value: string;
|
|
403
408
|
}) => void;
|
|
404
|
-
onCellEditChange?: ({ cell, event, table, }: {
|
|
409
|
+
onCellEditChange?: ({ cell, event, table, value, }: {
|
|
405
410
|
event: ChangeEvent<HTMLInputElement>;
|
|
406
411
|
cell: MRT_Cell<TData>;
|
|
407
412
|
table: MRT_TableInstance<TData>;
|
|
413
|
+
value: string;
|
|
408
414
|
}) => void;
|
|
409
415
|
onColumnDrop?: ({ event, draggedColumn, targetColumn, }: {
|
|
410
416
|
event: DragEvent<HTMLButtonElement>;
|
|
@@ -413,21 +419,22 @@ export declare type MaterialReactTableProps<TData extends Record<string, any> =
|
|
|
413
419
|
id: string;
|
|
414
420
|
} | null;
|
|
415
421
|
}) => void;
|
|
416
|
-
onCurrentDraggingColumnChange?: OnChangeFn<MRT_Column<TData> | null>;
|
|
417
|
-
onCurrentDraggingRowChange?: OnChangeFn<MRT_Row<TData> | null>;
|
|
418
|
-
onCurrentEditingCellChange?: OnChangeFn<MRT_Cell<TData> | null>;
|
|
419
|
-
onCurrentEditingRowChange?: OnChangeFn<MRT_Row<TData> | null>;
|
|
420
|
-
onCurrentFilterFnsChange?: OnChangeFn<{
|
|
421
|
-
[key: string]: MRT_FilterOption;
|
|
422
|
-
}>;
|
|
423
|
-
onCurrentGlobalFilterFnChange?: OnChangeFn<MRT_FilterOption>;
|
|
424
|
-
onCurrentHoveredColumnChange?: OnChangeFn<MRT_Column<TData> | null>;
|
|
425
|
-
onCurrentHoveredRowChange?: OnChangeFn<MRT_Row<TData> | null>;
|
|
426
422
|
onDensityChange?: OnChangeFn<boolean>;
|
|
427
|
-
|
|
423
|
+
onDraggingColumnChange?: OnChangeFn<MRT_Column<TData> | null>;
|
|
424
|
+
onDraggingRowChange?: OnChangeFn<MRT_Row<TData> | null>;
|
|
425
|
+
onEditRowSubmit?: ({ row, table, values, }: {
|
|
428
426
|
row: MRT_Row<TData>;
|
|
429
427
|
table: MRT_TableInstance<TData>;
|
|
428
|
+
values: Record<LiteralUnion<string & DeepKeys<TData>>, any>;
|
|
430
429
|
}) => Promise<void> | void;
|
|
430
|
+
onEditingCellChange?: OnChangeFn<MRT_Cell<TData> | null>;
|
|
431
|
+
onEditingRowChange?: OnChangeFn<MRT_Row<TData> | null>;
|
|
432
|
+
onFilterFnsChange?: OnChangeFn<{
|
|
433
|
+
[key: string]: MRT_FilterOption;
|
|
434
|
+
}>;
|
|
435
|
+
onGlobalFilterFnChange?: OnChangeFn<MRT_FilterOption>;
|
|
436
|
+
onHoveredColumnChange?: OnChangeFn<MRT_Column<TData> | null>;
|
|
437
|
+
onHoveredRowChange?: OnChangeFn<MRT_Row<TData> | null>;
|
|
431
438
|
onIsFullScreenChange?: OnChangeFn<boolean>;
|
|
432
439
|
onRowDrop?: ({ event, draggedRow, targetRow, }: {
|
|
433
440
|
event: DragEvent<HTMLButtonElement>;
|
|
@@ -461,23 +468,8 @@ export declare type MaterialReactTableProps<TData extends Record<string, any> =
|
|
|
461
468
|
row: MRT_Row<TData>;
|
|
462
469
|
table: MRT_TableInstance<TData>;
|
|
463
470
|
}) => ReactNode;
|
|
464
|
-
renderToolbarInternalActions?: ({ table,
|
|
465
|
-
table: MRT_TableInstance<TData>;
|
|
466
|
-
MRT_ToggleGlobalFilterButton: FC<IconButtonProps & {
|
|
467
|
-
table: MRT_TableInstance<TData>;
|
|
468
|
-
}>;
|
|
469
|
-
MRT_ToggleFiltersButton: FC<IconButtonProps & {
|
|
470
|
-
table: MRT_TableInstance<TData>;
|
|
471
|
-
}>;
|
|
472
|
-
MRT_ShowHideColumnsButton: FC<IconButtonProps & {
|
|
473
|
-
table: MRT_TableInstance<TData>;
|
|
474
|
-
}>;
|
|
475
|
-
MRT_ToggleDensePaddingButton: FC<IconButtonProps & {
|
|
476
|
-
table: MRT_TableInstance<TData>;
|
|
477
|
-
}>;
|
|
478
|
-
MRT_FullScreenToggleButton: FC<IconButtonProps & {
|
|
479
|
-
table: MRT_TableInstance<TData>;
|
|
480
|
-
}>;
|
|
471
|
+
renderToolbarInternalActions?: ({ table, }: {
|
|
472
|
+
table: MRT_TableInstance<TData>;
|
|
481
473
|
}) => ReactNode;
|
|
482
474
|
renderTopToolbarCustomActions?: ({ table, }: {
|
|
483
475
|
table: MRT_TableInstance<TData>;
|
|
@@ -487,9 +479,9 @@ export declare type MaterialReactTableProps<TData extends Record<string, any> =
|
|
|
487
479
|
selectAllMode?: 'all' | 'page';
|
|
488
480
|
state?: Partial<MRT_TableState<TData>>;
|
|
489
481
|
tableId?: string;
|
|
490
|
-
virtualizerProps?: Partial<VirtualizerOptions<HTMLDivElement
|
|
482
|
+
virtualizerProps?: Partial<VirtualizerOptions<HTMLDivElement>> | (({ table, }: {
|
|
491
483
|
table: MRT_TableInstance<TData>;
|
|
492
|
-
}) => Partial<VirtualizerOptions<HTMLDivElement
|
|
484
|
+
}) => Partial<VirtualizerOptions<HTMLDivElement>>);
|
|
493
485
|
};
|
|
494
486
|
declare const _default: <TData extends Record<string, any> = {}>({ aggregationFns, autoResetExpanded, columnResizeMode, defaultColumn, editingMode, enableBottomToolbar, enableColumnActions, enableColumnFilterChangeMode, enableColumnFilters, enableColumnOrdering, enableColumnResizing, enableDensityToggle, enableExpandAll, enableFilters, enableFullScreenToggle, enableGlobalFilter, enableGlobalFilterChangeMode, enableGlobalFilterRankedResults, enableGrouping, enableHiding, enableMultiRowSelection, enableMultiSort, enablePagination, enablePinning, enableRowSelection, enableSelectAll, enableSorting, enableStickyHeader, enableTableFooter, enableTableHead, enableToolbarInternalActions, enableTopToolbar, filterFns, icons, localization, positionActionsColumn, positionExpandColumn, positionGlobalFilter, positionPagination, positionToolbarAlertBanner, positionToolbarDropZone, rowNumberMode, selectAllMode, sortingFns, ...rest }: MaterialReactTableProps<TData>) => JSX.Element;
|
|
495
487
|
export default _default;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
1
|
import type { MRT_Column, MRT_TableInstance } from '..';
|
|
3
|
-
interface Props {
|
|
4
|
-
column: MRT_Column
|
|
5
|
-
table: MRT_TableInstance
|
|
2
|
+
interface Props<TData extends Record<string, any> = {}> {
|
|
3
|
+
column: MRT_Column<TData>;
|
|
4
|
+
table: MRT_TableInstance<TData>;
|
|
6
5
|
}
|
|
7
|
-
export declare const MRT_ColumnPinningButtons:
|
|
6
|
+
export declare const MRT_ColumnPinningButtons: <TData extends Record<string, any> = {}>({ column, table, }: Props<TData>) => JSX.Element;
|
|
8
7
|
export {};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
1
|
import { IconButtonProps } from '@mui/material';
|
|
3
2
|
import { MRT_TableInstance } from '..';
|
|
4
|
-
interface Props extends IconButtonProps {
|
|
5
|
-
table: MRT_TableInstance
|
|
3
|
+
interface Props<TData extends Record<string, any> = {}> extends IconButtonProps {
|
|
4
|
+
table: MRT_TableInstance<TData>;
|
|
6
5
|
}
|
|
7
|
-
export declare const MRT_FullScreenToggleButton:
|
|
6
|
+
export declare const MRT_FullScreenToggleButton: <TData extends Record<string, any> = {}>({ table, ...rest }: Props<TData>) => JSX.Element;
|
|
8
7
|
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { IconButtonProps } from '@mui/material';
|
|
2
|
-
import { DragEventHandler
|
|
2
|
+
import { DragEventHandler } from 'react';
|
|
3
3
|
import { MRT_TableInstance } from '..';
|
|
4
|
-
interface Props {
|
|
4
|
+
interface Props<TData extends Record<string, any> = {}> {
|
|
5
5
|
iconButtonProps?: IconButtonProps;
|
|
6
6
|
onDragStart: DragEventHandler<HTMLButtonElement>;
|
|
7
7
|
onDragEnd: DragEventHandler<HTMLButtonElement>;
|
|
8
|
-
table: MRT_TableInstance
|
|
8
|
+
table: MRT_TableInstance<TData>;
|
|
9
9
|
}
|
|
10
|
-
export declare const MRT_GrabHandleButton:
|
|
10
|
+
export declare const MRT_GrabHandleButton: <TData extends Record<string, any> = {}>({ iconButtonProps, onDragEnd, onDragStart, table, }: Props<TData>) => JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
1
|
import { IconButtonProps } from '@mui/material';
|
|
3
2
|
import { MRT_TableInstance } from '..';
|
|
4
|
-
interface Props extends IconButtonProps {
|
|
5
|
-
table: MRT_TableInstance
|
|
3
|
+
interface Props<TData extends Record<string, any> = {}> extends IconButtonProps {
|
|
4
|
+
table: MRT_TableInstance<TData>;
|
|
6
5
|
}
|
|
7
|
-
export declare const MRT_ShowHideColumnsButton:
|
|
6
|
+
export declare const MRT_ShowHideColumnsButton: <TData extends Record<string, any> = {}>({ table, ...rest }: Props<TData>) => JSX.Element;
|
|
8
7
|
export {};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
1
|
import { IconButtonProps } from '@mui/material';
|
|
3
2
|
import { MRT_TableInstance } from '..';
|
|
4
|
-
interface Props extends IconButtonProps {
|
|
5
|
-
table: MRT_TableInstance
|
|
3
|
+
interface Props<TData extends Record<string, any> = {}> extends IconButtonProps {
|
|
4
|
+
table: MRT_TableInstance<TData>;
|
|
6
5
|
}
|
|
7
|
-
export declare const MRT_ToggleDensePaddingButton:
|
|
6
|
+
export declare const MRT_ToggleDensePaddingButton: <TData extends Record<string, any> = {}>({ table, ...rest }: Props<TData>) => JSX.Element;
|
|
8
7
|
export {};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
1
|
import { IconButtonProps } from '@mui/material';
|
|
3
2
|
import { MRT_TableInstance } from '..';
|
|
4
|
-
interface Props extends IconButtonProps {
|
|
5
|
-
table: MRT_TableInstance
|
|
3
|
+
interface Props<TData extends Record<string, any> = {}> extends IconButtonProps {
|
|
4
|
+
table: MRT_TableInstance<TData>;
|
|
6
5
|
}
|
|
7
|
-
export declare const MRT_ToggleFiltersButton:
|
|
6
|
+
export declare const MRT_ToggleFiltersButton: <TData extends Record<string, any> = {}>({ table, ...rest }: Props<TData>) => JSX.Element;
|
|
8
7
|
export {};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
1
|
import { IconButtonProps } from '@mui/material';
|
|
3
2
|
import { MRT_TableInstance } from '..';
|
|
4
|
-
interface Props extends IconButtonProps {
|
|
5
|
-
table: MRT_TableInstance
|
|
3
|
+
interface Props<TData extends Record<string, any> = {}> extends IconButtonProps {
|
|
4
|
+
table: MRT_TableInstance<TData>;
|
|
6
5
|
}
|
|
7
|
-
export declare const MRT_ToggleGlobalFilterButton:
|
|
6
|
+
export declare const MRT_ToggleGlobalFilterButton: <TData extends Record<string, any> = {}>({ table, ...rest }: Props<TData>) => JSX.Element;
|
|
8
7
|
export {};
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -2,6 +2,12 @@ import MaterialReactTable from './MaterialReactTable';
|
|
|
2
2
|
export default MaterialReactTable;
|
|
3
3
|
export * from './MaterialReactTable';
|
|
4
4
|
import type { MRT_Icons } from './icons';
|
|
5
|
-
export type { MRT_Icons };
|
|
6
5
|
import type { MRT_Localization } from './localization';
|
|
7
|
-
export type { MRT_Localization };
|
|
6
|
+
export type { MRT_Localization, MRT_Icons };
|
|
7
|
+
import { MRT_FullScreenToggleButton } from './buttons/MRT_FullScreenToggleButton';
|
|
8
|
+
import { MRT_GlobalFilterTextField } from './inputs/MRT_GlobalFilterTextField';
|
|
9
|
+
import { MRT_ShowHideColumnsButton } from './buttons/MRT_ShowHideColumnsButton';
|
|
10
|
+
import { MRT_ToggleDensePaddingButton } from './buttons/MRT_ToggleDensePaddingButton';
|
|
11
|
+
import { MRT_ToggleFiltersButton } from './buttons/MRT_ToggleFiltersButton';
|
|
12
|
+
import { MRT_ToggleGlobalFilterButton } from './buttons/MRT_ToggleGlobalFilterButton';
|
|
13
|
+
export { MRT_FullScreenToggleButton, MRT_GlobalFilterTextField, MRT_ShowHideColumnsButton, MRT_ToggleDensePaddingButton, MRT_ToggleFiltersButton, MRT_ToggleGlobalFilterButton, };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
1
|
import { MRT_TableInstance } from '..';
|
|
3
|
-
interface Props {
|
|
4
|
-
table: MRT_TableInstance
|
|
2
|
+
interface Props<TData extends Record<string, any> = {}> {
|
|
3
|
+
table: MRT_TableInstance<TData>;
|
|
5
4
|
}
|
|
6
|
-
export declare const MRT_GlobalFilterTextField:
|
|
5
|
+
export declare const MRT_GlobalFilterTextField: <TData extends Record<string, any> = {}>({ table, }: Props<TData>) => JSX.Element;
|
|
7
6
|
export {};
|