material-react-table 0.40.4 → 0.40.7
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 +13 -3
- package/dist/cjs/index.js +58 -48
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/MaterialReactTable.d.ts +13 -3
- package/dist/esm/material-react-table.esm.js +59 -49
- package/dist/esm/material-react-table.esm.js.map +1 -1
- package/dist/index.d.ts +13 -3
- package/package.json +4 -4
- package/src/MaterialReactTable.tsx +21 -3
- package/src/body/MRT_TableBody.tsx +9 -7
- package/src/head/MRT_TableHeadCellFilterLabel.tsx +1 -3
- package/src/inputs/MRT_EditCellTextField.tsx +1 -6
- package/src/inputs/MRT_FilterTextField.tsx +11 -3
- package/src/menus/MRT_ColumnActionMenu.tsx +63 -50
- package/src/menus/MRT_FilterOptionMenu.tsx +3 -3
- package/src/table/MRT_TableRoot.tsx +5 -6
|
@@ -216,12 +216,17 @@ export declare type MRT_ColumnDef<TData extends Record<string, any> = {}> = Omit
|
|
|
216
216
|
table: MRT_TableInstance<TData>;
|
|
217
217
|
column: MRT_Column<TData>;
|
|
218
218
|
}) => TableCellProps);
|
|
219
|
+
renderColumnActionsMenuItems?: ({ closeMenu, column, table, }: {
|
|
220
|
+
closeMenu: () => void;
|
|
221
|
+
column: MRT_Column<TData>;
|
|
222
|
+
table: MRT_TableInstance<TData>;
|
|
223
|
+
}) => ReactNode[];
|
|
219
224
|
renderColumnFilterModeMenuItems?: ({ column, internalFilterOptions, onSelectFilterMode, table, }: {
|
|
220
225
|
column: MRT_Column<TData>;
|
|
221
226
|
internalFilterOptions: MRT_InternalFilterOption[];
|
|
222
227
|
onSelectFilterMode: (filterMode: MRT_FilterOption) => void;
|
|
223
228
|
table: MRT_TableInstance<TData>;
|
|
224
|
-
}) => ReactNode;
|
|
229
|
+
}) => ReactNode[];
|
|
225
230
|
sortingFn?: MRT_SortingFn;
|
|
226
231
|
};
|
|
227
232
|
export declare type MRT_DefinedColumnDef<TData extends Record<string, any> = {}> = Omit<MRT_ColumnDef<TData>, 'id'> & {
|
|
@@ -306,7 +311,7 @@ export declare type MaterialReactTableProps<TData extends Record<string, any> =
|
|
|
306
311
|
enableTableHead?: boolean;
|
|
307
312
|
enableToolbarInternalActions?: boolean;
|
|
308
313
|
enableTopToolbar?: boolean;
|
|
309
|
-
|
|
314
|
+
globalFilterModeOptions?: (MRT_FilterOption | string)[] | null;
|
|
310
315
|
expandRowsFn?: (dataRow: TData) => TData[];
|
|
311
316
|
icons?: Partial<MRT_Icons>;
|
|
312
317
|
initialState?: Partial<MRT_TableState<TData>>;
|
|
@@ -472,12 +477,17 @@ export declare type MaterialReactTableProps<TData extends Record<string, any> =
|
|
|
472
477
|
renderBottomToolbarCustomActions?: ({ table, }: {
|
|
473
478
|
table: MRT_TableInstance<TData>;
|
|
474
479
|
}) => ReactNode;
|
|
480
|
+
renderColumnActionsMenuItems?: ({ column, closeMenu, table, }: {
|
|
481
|
+
column: MRT_Column<TData>;
|
|
482
|
+
closeMenu: () => void;
|
|
483
|
+
table: MRT_TableInstance<TData>;
|
|
484
|
+
}) => ReactNode[];
|
|
475
485
|
renderColumnFilterModeMenuItems?: ({ column, internalFilterOptions, onSelectFilterMode, table, }: {
|
|
476
486
|
column: MRT_Column<TData>;
|
|
477
487
|
internalFilterOptions: MRT_InternalFilterOption[];
|
|
478
488
|
onSelectFilterMode: (filterMode: MRT_FilterOption) => void;
|
|
479
489
|
table: MRT_TableInstance<TData>;
|
|
480
|
-
}) => ReactNode;
|
|
490
|
+
}) => ReactNode[];
|
|
481
491
|
renderDetailPanel?: ({ row, table, }: {
|
|
482
492
|
row: MRT_Row<TData>;
|
|
483
493
|
table: MRT_TableInstance<TData>;
|
|
@@ -2,7 +2,7 @@ import React, { useMemo, useRef, useState, useCallback, Fragment, useEffect, use
|
|
|
2
2
|
import { aggregationFns, filterFns, sortingFns, useReactTable, getCoreRowModel, getExpandedRowModel, getFacetedRowModel, getFilteredRowModel, getGroupedRowModel, getPaginationRowModel, getSortedRowModel } from '@tanstack/react-table';
|
|
3
3
|
import { ArrowRight, Cancel, CheckBox, ClearAll, Close, DensityLarge, DensityMedium, DensitySmall, DragHandle, DynamicFeed, Edit, ExpandLess, ExpandMore, FilterAlt, FilterAltOff, FilterList, FilterListOff, FullscreenExit, Fullscreen, KeyboardDoubleArrowDown, MoreHoriz, MoreVert, PushPin, RestartAlt, Save, Search, SearchOff, Sort, ViewColumn, VisibilityOff } from '@mui/icons-material';
|
|
4
4
|
import { rankItem, rankings, compareItems } from '@tanstack/match-sorter-utils';
|
|
5
|
-
import { Tooltip, IconButton, Menu, MenuItem, Box, FormControlLabel, Switch, Typography, Button, Divider, ListItemIcon, Checkbox, debounce, Collapse, TextField, InputAdornment, LinearProgress, TablePagination, Chip, Alert, AlertTitle, Fade, alpha, useMediaQuery, Toolbar, lighten,
|
|
5
|
+
import { Tooltip, IconButton, Menu, MenuItem, Box, FormControlLabel, Switch, Typography, Button, Divider, ListItemIcon, Checkbox, debounce, Collapse, TextField, InputAdornment, LinearProgress, TablePagination, Chip, Alert, AlertTitle, Fade, alpha, useMediaQuery, Toolbar, lighten, Grow, TableSortLabel, useTheme, TableCell, TableRow, TableHead, darken, Skeleton, TableBody, TableFooter, Table, TableContainer, Paper, Dialog, DialogTitle, DialogContent, Stack, DialogActions } from '@mui/material';
|
|
6
6
|
import { useVirtual } from 'react-virtual';
|
|
7
7
|
|
|
8
8
|
/******************************************************************************
|
|
@@ -383,7 +383,7 @@ const mrtFilterOptions = (localization) => [
|
|
|
383
383
|
];
|
|
384
384
|
const MRT_FilterOptionMenu = ({ anchorEl, header, onSelect, setAnchorEl, table, }) => {
|
|
385
385
|
var _a, _b, _c, _d;
|
|
386
|
-
const { getState, options: {
|
|
386
|
+
const { getState, options: { columnFilterModeOptions, globalFilterModeOptions, localization, renderColumnFilterModeMenuItems, renderGlobalFilterModeMenuItems, }, setColumnFilterFns, setGlobalFilterFn, } = table;
|
|
387
387
|
const { globalFilterFn, density } = getState();
|
|
388
388
|
const { column } = header !== null && header !== void 0 ? header : {};
|
|
389
389
|
const { columnDef } = column !== null && column !== void 0 ? column : {};
|
|
@@ -391,8 +391,8 @@ const MRT_FilterOptionMenu = ({ anchorEl, header, onSelect, setAnchorEl, table,
|
|
|
391
391
|
const internalFilterOptions = useMemo(() => mrtFilterOptions(localization).filter((filterOption) => columnDef
|
|
392
392
|
? allowedColumnFilterOptions === undefined ||
|
|
393
393
|
(allowedColumnFilterOptions === null || allowedColumnFilterOptions === void 0 ? void 0 : allowedColumnFilterOptions.includes(filterOption.option))
|
|
394
|
-
: (!
|
|
395
|
-
|
|
394
|
+
: (!globalFilterModeOptions ||
|
|
395
|
+
globalFilterModeOptions.includes(filterOption.option)) &&
|
|
396
396
|
['fuzzy', 'contains', 'startsWith'].includes(filterOption.option)), []);
|
|
397
397
|
const handleSelectFilterMode = (option) => {
|
|
398
398
|
if (header && column) {
|
|
@@ -728,8 +728,8 @@ const commonListItemStyles = {
|
|
|
728
728
|
alignItems: 'center',
|
|
729
729
|
};
|
|
730
730
|
const MRT_ColumnActionMenu = ({ anchorEl, header, setAnchorEl, table, }) => {
|
|
731
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
732
|
-
const { getState, toggleAllColumnsVisible, setColumnOrder, options: { enableColumnFilterModes, enableColumnFilters, enableColumnResizing, enableGrouping, enableHiding, enablePinning, enableSorting,
|
|
731
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
732
|
+
const { getState, toggleAllColumnsVisible, setColumnOrder, options: { columnFilterModeOptions, enableColumnFilterModes, enableColumnFilters, enableColumnResizing, enableGrouping, enableHiding, enablePinning, enableSorting, icons: { ArrowRightIcon, ClearAllIcon, ViewColumnIcon, DynamicFeedIcon, FilterListIcon, FilterListOffIcon, PushPinIcon, SortIcon, RestartAltIcon, VisibilityOffIcon, }, localization, renderColumnActionsMenuItems, }, refs: { filterInputRefs }, setShowFilters, } = table;
|
|
733
733
|
const { column } = header;
|
|
734
734
|
const { columnDef } = column;
|
|
735
735
|
const { columnSizing, columnVisibility, density } = getState();
|
|
@@ -794,25 +794,32 @@ const MRT_ColumnActionMenu = ({ anchorEl, header, setAnchorEl, table, }) => {
|
|
|
794
794
|
!!(allowedColumnFilterOptions === null || allowedColumnFilterOptions === void 0 ? void 0 : allowedColumnFilterOptions.length));
|
|
795
795
|
return (React.createElement(Menu, { anchorEl: anchorEl, open: !!anchorEl, onClose: () => setAnchorEl(null), MenuListProps: {
|
|
796
796
|
dense: density === 'compact',
|
|
797
|
-
} },
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
797
|
+
} }, (_d = (_c = (_b = columnDef.renderColumnActionsMenuItems) === null || _b === void 0 ? void 0 : _b.call(columnDef, {
|
|
798
|
+
closeMenu: () => setAnchorEl(null),
|
|
799
|
+
column,
|
|
800
|
+
table,
|
|
801
|
+
})) !== null && _c !== void 0 ? _c : renderColumnActionsMenuItems === null || renderColumnActionsMenuItems === void 0 ? void 0 : renderColumnActionsMenuItems({
|
|
802
|
+
closeMenu: () => setAnchorEl(null),
|
|
803
|
+
column,
|
|
804
|
+
table,
|
|
805
|
+
})) !== null && _d !== void 0 ? _d : (enableSorting &&
|
|
806
|
+
column.getCanSort() && [
|
|
807
|
+
React.createElement(MenuItem, { disabled: !column.getIsSorted(), key: 0, onClick: handleClearSort, sx: commonMenuItemStyles },
|
|
808
|
+
React.createElement(Box, { sx: commonListItemStyles },
|
|
809
|
+
React.createElement(ListItemIcon, null,
|
|
810
|
+
React.createElement(ClearAllIcon, null)),
|
|
811
|
+
localization.clearSort)),
|
|
812
|
+
React.createElement(MenuItem, { disabled: column.getIsSorted() === 'asc', key: 1, onClick: handleSortAsc, sx: commonMenuItemStyles },
|
|
813
|
+
React.createElement(Box, { sx: commonListItemStyles },
|
|
814
|
+
React.createElement(ListItemIcon, null,
|
|
815
|
+
React.createElement(SortIcon, { style: { transform: 'rotate(180deg) scaleX(-1)' } })), (_e = localization.sortByColumnAsc) === null || _e === void 0 ? void 0 :
|
|
816
|
+
_e.replace('{column}', String(columnDef.header)))),
|
|
817
|
+
React.createElement(MenuItem, { divider: enableColumnFilters || enableGrouping || enableHiding, key: 2, disabled: column.getIsSorted() === 'desc', onClick: handleSortDesc, sx: commonMenuItemStyles },
|
|
818
|
+
React.createElement(Box, { sx: commonListItemStyles },
|
|
819
|
+
React.createElement(ListItemIcon, null,
|
|
820
|
+
React.createElement(SortIcon, null)), (_f = localization.sortByColumnDesc) === null || _f === void 0 ? void 0 :
|
|
821
|
+
_f.replace('{column}', String(columnDef.header)))),
|
|
822
|
+
]),
|
|
816
823
|
enableColumnFilters &&
|
|
817
824
|
column.getCanFilter() &&
|
|
818
825
|
[
|
|
@@ -824,8 +831,8 @@ const MRT_ColumnActionMenu = ({ anchorEl, header, setAnchorEl, table, }) => {
|
|
|
824
831
|
React.createElement(MenuItem, { divider: enableGrouping || enableHiding, key: 1, onClick: handleFilterByColumn, sx: commonMenuItemStyles },
|
|
825
832
|
React.createElement(Box, { sx: commonListItemStyles },
|
|
826
833
|
React.createElement(ListItemIcon, null,
|
|
827
|
-
React.createElement(FilterListIcon, null)), (
|
|
828
|
-
|
|
834
|
+
React.createElement(FilterListIcon, null)), (_g = localization.filterByColumn) === null || _g === void 0 ? void 0 :
|
|
835
|
+
_g.replace('{column}', String(columnDef.header))),
|
|
829
836
|
showFilterModeSubMenu && (React.createElement(IconButton, { onClick: handleOpenFilterModeMenu, onMouseEnter: handleOpenFilterModeMenu, size: "small", sx: { p: 0 } },
|
|
830
837
|
React.createElement(ArrowRightIcon, null)))),
|
|
831
838
|
showFilterModeSubMenu && (React.createElement(MRT_FilterOptionMenu, { anchorEl: filterMenuAnchorEl, header: header, key: 2, onSelect: handleFilterByColumn, setAnchorEl: setFilterMenuAnchorEl, table: table })),
|
|
@@ -835,8 +842,8 @@ const MRT_ColumnActionMenu = ({ anchorEl, header, setAnchorEl, table, }) => {
|
|
|
835
842
|
React.createElement(MenuItem, { divider: enablePinning, key: 0, onClick: handleGroupByColumn, sx: commonMenuItemStyles },
|
|
836
843
|
React.createElement(Box, { sx: commonListItemStyles },
|
|
837
844
|
React.createElement(ListItemIcon, null,
|
|
838
|
-
React.createElement(DynamicFeedIcon, null)), (
|
|
839
|
-
|
|
845
|
+
React.createElement(DynamicFeedIcon, null)), (_h = localization[column.getIsGrouped() ? 'ungroupByColumn' : 'groupByColumn']) === null || _h === void 0 ? void 0 :
|
|
846
|
+
_h.replace('{column}', String(columnDef.header)))),
|
|
840
847
|
],
|
|
841
848
|
enablePinning &&
|
|
842
849
|
column.getCanPin() && [
|
|
@@ -868,14 +875,14 @@ const MRT_ColumnActionMenu = ({ anchorEl, header, setAnchorEl, table, }) => {
|
|
|
868
875
|
React.createElement(MenuItem, { disabled: columnDef.enableHiding === false, key: 0, onClick: handleHideColumn, sx: commonMenuItemStyles },
|
|
869
876
|
React.createElement(Box, { sx: commonListItemStyles },
|
|
870
877
|
React.createElement(ListItemIcon, null,
|
|
871
|
-
React.createElement(VisibilityOffIcon, null)), (
|
|
872
|
-
|
|
878
|
+
React.createElement(VisibilityOffIcon, null)), (_j = localization.hideColumn) === null || _j === void 0 ? void 0 :
|
|
879
|
+
_j.replace('{column}', String(columnDef.header)))),
|
|
873
880
|
React.createElement(MenuItem, { disabled: !Object.values(columnVisibility).filter((visible) => !visible)
|
|
874
881
|
.length, key: 1, onClick: handleShowAllColumns, sx: commonMenuItemStyles },
|
|
875
882
|
React.createElement(Box, { sx: commonListItemStyles },
|
|
876
883
|
React.createElement(ListItemIcon, null,
|
|
877
|
-
React.createElement(ViewColumnIcon, null)), (
|
|
878
|
-
|
|
884
|
+
React.createElement(ViewColumnIcon, null)), (_k = localization.showAllColumns) === null || _k === void 0 ? void 0 :
|
|
885
|
+
_k.replace('{column}', String(columnDef.header))),
|
|
879
886
|
React.createElement(IconButton, { onClick: handleOpenShowHideColumnsMenu, onMouseEnter: handleOpenShowHideColumnsMenu, size: "small", sx: { p: 0 } },
|
|
880
887
|
React.createElement(ArrowRightIcon, null))),
|
|
881
888
|
React.createElement(MRT_ShowHideColumnsMenu, { anchorEl: showHideColumnsMenuAnchorEl, isSubMenu: true, key: 2, setAnchorEl: setShowHideColumnsMenuAnchorEl, table: table }),
|
|
@@ -1496,9 +1503,14 @@ const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
|
|
|
1496
1503
|
value = option.value;
|
|
1497
1504
|
text = option.text;
|
|
1498
1505
|
}
|
|
1499
|
-
return (React.createElement(MenuItem, { key: value,
|
|
1506
|
+
return (React.createElement(MenuItem, { key: value, sx: {
|
|
1507
|
+
display: 'flex',
|
|
1508
|
+
m: 0,
|
|
1509
|
+
alignItems: 'center',
|
|
1510
|
+
gap: '0.5rem',
|
|
1511
|
+
}, value: value },
|
|
1500
1512
|
isMultiSelectFilter && (React.createElement(Checkbox, { checked: ((_a = column.getFilterValue()) !== null && _a !== void 0 ? _a : []).includes(value), sx: { mr: '0.5rem' } })),
|
|
1501
|
-
|
|
1513
|
+
text));
|
|
1502
1514
|
})),
|
|
1503
1515
|
React.createElement(MRT_FilterOptionMenu, { anchorEl: anchorEl, header: header, setAnchorEl: setAnchorEl, table: table })));
|
|
1504
1516
|
};
|
|
@@ -1519,8 +1531,7 @@ const MRT_TableHeadCellFilterContainer = ({ header, table, }) => {
|
|
|
1519
1531
|
|
|
1520
1532
|
const MRT_TableHeadCellFilterLabel = ({ header, table }) => {
|
|
1521
1533
|
var _a, _b, _c;
|
|
1522
|
-
const {
|
|
1523
|
-
const { columnFilterFns } = getState();
|
|
1534
|
+
const { options: { icons: { FilterAltIcon }, localization, }, } = table;
|
|
1524
1535
|
const { column } = header;
|
|
1525
1536
|
const { columnDef } = column;
|
|
1526
1537
|
const isRangeFilter = [
|
|
@@ -1528,7 +1539,7 @@ const MRT_TableHeadCellFilterLabel = ({ header, table }) => {
|
|
|
1528
1539
|
'betweenInclusive',
|
|
1529
1540
|
'inNumberRange',
|
|
1530
1541
|
].includes(columnDef._filterFn);
|
|
1531
|
-
const currentFilterOption =
|
|
1542
|
+
const currentFilterOption = columnDef._filterFn;
|
|
1532
1543
|
const filterTooltip = localization.filteringByColumn
|
|
1533
1544
|
.replace('{column}', String(columnDef.header))
|
|
1534
1545
|
.replace('{filterType}',
|
|
@@ -2127,7 +2138,7 @@ const MRT_TableBodyRow = ({ row, rowIndex, table, virtualRow, }) => {
|
|
|
2127
2138
|
};
|
|
2128
2139
|
|
|
2129
2140
|
const MRT_TableBody = ({ table, tableContainerRef }) => {
|
|
2130
|
-
const { getRowModel, getPrePaginationRowModel, getState, options: { enableGlobalFilterRankedResults, enablePagination, enableRowVirtualization,
|
|
2141
|
+
const { getRowModel, getPrePaginationRowModel, getState, options: { enableGlobalFilterRankedResults, enablePagination, enableRowVirtualization, manualFiltering, manualSorting, muiTableBodyProps, virtualizerInstanceRef, virtualizerProps, }, } = table;
|
|
2131
2142
|
const { globalFilter, pagination, sorting } = getState();
|
|
2132
2143
|
const tableBodyProps = muiTableBodyProps instanceof Function
|
|
2133
2144
|
? muiTableBodyProps({ table })
|
|
@@ -2138,6 +2149,8 @@ const MRT_TableBody = ({ table, tableContainerRef }) => {
|
|
|
2138
2149
|
const rows = useMemo(() => {
|
|
2139
2150
|
if (enableGlobalFilterRankedResults &&
|
|
2140
2151
|
globalFilter &&
|
|
2152
|
+
!manualFiltering &&
|
|
2153
|
+
!manualSorting &&
|
|
2141
2154
|
!Object.values(sorting).some(Boolean)) {
|
|
2142
2155
|
const rankedRows = getPrePaginationRowModel().rows.sort((a, b) => rankGlobalFuzzy(a, b));
|
|
2143
2156
|
if (enablePagination) {
|
|
@@ -2158,11 +2171,9 @@ const MRT_TableBody = ({ table, tableContainerRef }) => {
|
|
|
2158
2171
|
const virtualizer = enableRowVirtualization
|
|
2159
2172
|
? useVirtual(Object.assign({ size: rows.length, parentRef: tableContainerRef, overscan: 15 }, vProps))
|
|
2160
2173
|
: {};
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
}
|
|
2165
|
-
}, [virtualizer]);
|
|
2174
|
+
if (virtualizerInstanceRef) {
|
|
2175
|
+
virtualizerInstanceRef.current = virtualizer;
|
|
2176
|
+
}
|
|
2166
2177
|
// const virtualizer: Virtualizer = enableRowVirtualization
|
|
2167
2178
|
// ? useVirtualizer({
|
|
2168
2179
|
// count: rows.length,
|
|
@@ -2412,6 +2423,7 @@ const MRT_TableRoot = (props) => {
|
|
|
2412
2423
|
props.displayColumnDefOptions,
|
|
2413
2424
|
props.editingMode,
|
|
2414
2425
|
props.enableColumnDragging,
|
|
2426
|
+
props.enableColumnFilterModes,
|
|
2415
2427
|
props.enableColumnOrdering,
|
|
2416
2428
|
props.enableEditing,
|
|
2417
2429
|
props.enableExpandAll,
|
|
@@ -2469,11 +2481,9 @@ const MRT_TableRoot = (props) => {
|
|
|
2469
2481
|
tableContainerRef,
|
|
2470
2482
|
topToolbarRef,
|
|
2471
2483
|
}, setColumnFilterFns: (_w = props.onFilterFnsChange) !== null && _w !== void 0 ? _w : setColumnFilterFns, setDensity: (_x = props.onDensityChange) !== null && _x !== void 0 ? _x : setDensity, setDraggingColumn: (_y = props.onDraggingColumnChange) !== null && _y !== void 0 ? _y : setDraggingColumn, setDraggingRow: (_z = props.onDraggingRowChange) !== null && _z !== void 0 ? _z : setDraggingRow, setEditingCell: (_0 = props.onEditingCellChange) !== null && _0 !== void 0 ? _0 : setEditingCell, setEditingRow: (_1 = props.onEditingRowChange) !== null && _1 !== void 0 ? _1 : setEditingRow, setGlobalFilterFn: (_2 = props.onGlobalFilterFnChange) !== null && _2 !== void 0 ? _2 : setGlobalFilterFn, setHoveredColumn: (_3 = props.onHoveredColumnChange) !== null && _3 !== void 0 ? _3 : setHoveredColumn, setHoveredRow: (_4 = props.onHoveredRowChange) !== null && _4 !== void 0 ? _4 : setHoveredRow, setIsFullScreen: (_5 = props.onIsFullScreenChange) !== null && _5 !== void 0 ? _5 : setIsFullScreen, setShowAlertBanner: (_6 = props.onShowAlertBannerChange) !== null && _6 !== void 0 ? _6 : setShowAlertBanner, setShowFilters: (_7 = props.onShowFiltersChange) !== null && _7 !== void 0 ? _7 : setShowFilters, setShowGlobalFilter: (_8 = props.onShowGlobalFilterChange) !== null && _8 !== void 0 ? _8 : setShowGlobalFilter });
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
}
|
|
2476
|
-
}, [table]);
|
|
2484
|
+
if (props.tableInstanceRef) {
|
|
2485
|
+
props.tableInstanceRef.current = table;
|
|
2486
|
+
}
|
|
2477
2487
|
return (React.createElement(React.Fragment, null,
|
|
2478
2488
|
React.createElement(Dialog, { PaperComponent: Box, TransitionComponent: Grow, disablePortal: true, fullScreen: true, keepMounted: false, onClose: () => setIsFullScreen(false), open: isFullScreen, transitionDuration: 400 },
|
|
2479
2489
|
React.createElement(MRT_TablePaper, { table: table })),
|