material-react-table 2.9.0 → 2.9.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.
- package/dist/index.esm.js +67 -65
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +66 -64
- package/dist/index.js.map +1 -1
- package/package.json +11 -11
- package/src/components/body/MRT_TableBodyCell.tsx +0 -5
- package/src/components/body/MRT_TableBodyRow.tsx +15 -17
- package/src/components/footer/MRT_TableFooter.tsx +1 -1
- package/src/components/footer/MRT_TableFooterCell.tsx +2 -4
- package/src/components/footer/MRT_TableFooterRow.tsx +1 -0
- package/src/components/head/MRT_TableHeadCell.tsx +0 -6
- package/src/components/head/MRT_TableHeadRow.tsx +5 -1
- package/src/components/inputs/MRT_EditCellTextField.tsx +4 -1
- package/src/components/inputs/MRT_FilterTextField.tsx +1 -0
- package/src/components/menus/MRT_ColumnActionMenu.tsx +1 -0
- package/src/components/menus/MRT_FilterOptionMenu.tsx +1 -0
- package/src/components/menus/MRT_RowActionMenu.tsx +1 -0
- package/src/components/menus/MRT_ShowHideColumnsMenu.tsx +1 -0
- package/src/components/table/MRT_Table.tsx +1 -0
- package/src/components/toolbar/MRT_TablePagination.tsx +14 -5
- package/src/hooks/useMRT_TableInstance.ts +1 -42
- package/src/hooks/useMRT_TableOptions.ts +33 -0
- package/src/utils/row.utils.ts +4 -1
- package/src/utils/style.utils.ts +17 -4
- package/src/utils.ts +0 -0
package/dist/index.js
CHANGED
@@ -378,7 +378,7 @@ const getValueAndLabel = (option) => {
|
|
378
378
|
};
|
379
379
|
|
380
380
|
const getIsRowSelected = ({ row, table, }) => {
|
381
|
-
const { options: enableRowSelection } = table;
|
381
|
+
const { options: { enableRowSelection }, } = table;
|
382
382
|
return (row.getIsSelected() ||
|
383
383
|
(parseFromValuesOrFunc(enableRowSelection, row) &&
|
384
384
|
row.getCanSelectSubRows() &&
|
@@ -589,7 +589,7 @@ const getMRTTheme = (table, theme) => {
|
|
589
589
|
? styles.darken(theme.palette.warning.dark, 0.25)
|
590
590
|
: styles.lighten(theme.palette.warning.light, 0.5), menuBackgroundColor: styles.lighten(baseBackgroundColor, 0.07), pinnedRowBackgroundColor: styles.alpha(theme.palette.primary.main, 0.1), selectedRowBackgroundColor: styles.alpha(theme.palette.primary.main, 0.2) }, themeOverrides);
|
591
591
|
};
|
592
|
-
const
|
592
|
+
const commonCellBeforeAfterStyles = {
|
593
593
|
content: '""',
|
594
594
|
height: '100%',
|
595
595
|
left: 0,
|
@@ -608,14 +608,16 @@ const getCommonPinnedCellStyles = ({ column, table, theme, }) => {
|
|
608
608
|
: getIsFirstRightPinnedColumn(column)
|
609
609
|
? `4px 0 4px -4px ${styles.alpha(theme.palette.grey[700], 0.5)} inset`
|
610
610
|
: undefined
|
611
|
-
: undefined },
|
611
|
+
: undefined }, commonCellBeforeAfterStyles),
|
612
612
|
},
|
613
613
|
};
|
614
614
|
};
|
615
615
|
const getCommonMRTCellStyles = ({ column, header, table, tableCellProps, theme, }) => {
|
616
616
|
var _a, _b, _c, _d, _e, _f;
|
617
|
-
const { options: { enableColumnVirtualization, layoutMode }, } = table;
|
617
|
+
const { getState, options: { enableColumnVirtualization, layoutMode }, } = table;
|
618
|
+
const { draggingColumn } = getState();
|
618
619
|
const { columnDef } = column;
|
620
|
+
const { columnDefType } = columnDef;
|
619
621
|
const isColumnPinned = columnDef.columnDefType !== 'group' && column.getIsPinned();
|
620
622
|
const widthStyles = {
|
621
623
|
minWidth: `max(calc(var(--${header ? 'header' : 'col'}-${parseCSSVarId((_a = header === null || header === void 0 ? void 0 : header.id) !== null && _a !== void 0 ? _a : column.id)}-size) * 1px), ${(_b = columnDef.minSize) !== null && _b !== void 0 ? _b : 30}px)`,
|
@@ -634,13 +636,21 @@ const getCommonMRTCellStyles = ({ column, header, table, tableCellProps, theme,
|
|
634
636
|
? `${column.getStart('left')}px`
|
635
637
|
: undefined, opacity: 0.97, position: 'sticky', right: isColumnPinned === 'right'
|
636
638
|
? `${getTotalRight(table, column)}px`
|
637
|
-
: undefined
|
638
|
-
return Object.assign(Object.assign(Object.assign({ backgroundColor: 'inherit', backgroundImage: 'inherit', display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'flex' : undefined,
|
639
|
+
: undefined }) : {};
|
640
|
+
return Object.assign(Object.assign(Object.assign({ backgroundColor: 'inherit', backgroundImage: 'inherit', display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'flex' : undefined, justifyContent: columnDefType === 'group'
|
641
|
+
? 'center'
|
642
|
+
: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid'))
|
643
|
+
? tableCellProps.align
|
644
|
+
: undefined, opacity: ((_e = table.getState().draggingColumn) === null || _e === void 0 ? void 0 : _e.id) === column.id ||
|
639
645
|
((_f = table.getState().hoveredColumn) === null || _f === void 0 ? void 0 : _f.id) === column.id
|
640
646
|
? 0.5
|
641
647
|
: 1, position: 'relative', transition: enableColumnVirtualization
|
642
648
|
? 'none'
|
643
|
-
: `padding 150ms ease-in-out`, zIndex:
|
649
|
+
: `padding 150ms ease-in-out`, zIndex: column.getIsResizing() || (draggingColumn === null || draggingColumn === void 0 ? void 0 : draggingColumn.id) === column.id
|
650
|
+
? 2
|
651
|
+
: columnDefType !== 'group' && isColumnPinned
|
652
|
+
? 1
|
653
|
+
: 0 }, pinnedStyles), widthStyles), parseFromValuesOrFunc(tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx, theme));
|
644
654
|
};
|
645
655
|
const getCommonToolbarStyles = ({ table, theme, }) => ({
|
646
656
|
alignItems: 'flex-start',
|
@@ -846,7 +856,7 @@ const MRT_FilterOptionMenu = (_a) => {
|
|
846
856
|
sx: {
|
847
857
|
backgroundColor: menuBackgroundColor,
|
848
858
|
},
|
849
|
-
}, anchorEl: anchorEl, anchorOrigin: { horizontal: 'right', vertical: 'center' }, onClose: () => setAnchorEl(null), open: !!anchorEl }, rest, { children: (_e = (header && column && columnDef
|
859
|
+
}, anchorEl: anchorEl, anchorOrigin: { horizontal: 'right', vertical: 'center' }, disableScrollLock: true, onClose: () => setAnchorEl(null), open: !!anchorEl }, rest, { children: (_e = (header && column && columnDef
|
850
860
|
? (_d = (_c = columnDef.renderColumnFilterModeMenuItems) === null || _c === void 0 ? void 0 : _c.call(columnDef, {
|
851
861
|
column: column,
|
852
862
|
internalFilterOptions,
|
@@ -1001,7 +1011,7 @@ const MRT_ColumnActionMenu = (_a) => {
|
|
1001
1011
|
sx: {
|
1002
1012
|
backgroundColor: menuBackgroundColor,
|
1003
1013
|
},
|
1004
|
-
}, anchorEl: anchorEl, onClose: () => setAnchorEl(null), open: !!anchorEl }, rest, { children: (_l = (_k = (_j = columnDef.renderColumnActionsMenuItems) === null || _j === void 0 ? void 0 : _j.call(columnDef, {
|
1014
|
+
}, anchorEl: anchorEl, disableScrollLock: true, onClose: () => setAnchorEl(null), open: !!anchorEl }, rest, { children: (_l = (_k = (_j = columnDef.renderColumnActionsMenuItems) === null || _j === void 0 ? void 0 : _j.call(columnDef, {
|
1005
1015
|
closeMenu: () => setAnchorEl(null),
|
1006
1016
|
column,
|
1007
1017
|
internalColumnMenuItems,
|
@@ -1025,7 +1035,7 @@ const MRT_RowActionMenu = (_a) => {
|
|
1025
1035
|
sx: {
|
1026
1036
|
backgroundColor: menuBackgroundColor,
|
1027
1037
|
},
|
1028
|
-
}, anchorEl: anchorEl, onClick: (event) => event.stopPropagation(), onClose: () => setAnchorEl(null), open: !!anchorEl }, rest, { children: [parseFromValuesOrFunc(enableEditing, row) &&
|
1038
|
+
}, anchorEl: anchorEl, disableScrollLock: true, onClick: (event) => event.stopPropagation(), onClose: () => setAnchorEl(null), open: !!anchorEl }, rest, { children: [parseFromValuesOrFunc(enableEditing, row) &&
|
1029
1039
|
['modal', 'row'].includes(editDisplayMode) && (jsxRuntime.jsx(MenuItem__default["default"], { onClick: handleEdit, sx: commonMenuItemStyles, children: jsxRuntime.jsxs(Box__default["default"], { sx: commonListItemStyles, children: [jsxRuntime.jsx(ListItemIcon__default["default"], { children: jsxRuntime.jsx(EditIcon, {}) }), localization.edit] }) })), renderRowActionMenuItems === null || renderRowActionMenuItems === void 0 ? void 0 : renderRowActionMenuItems({
|
1030
1040
|
closeMenu: () => setAnchorEl(null),
|
1031
1041
|
row,
|
@@ -1521,7 +1531,7 @@ const MRT_DefaultDisplayColumn = {
|
|
1521
1531
|
};
|
1522
1532
|
const useMRT_TableOptions = (_a) => {
|
1523
1533
|
var _b;
|
1524
|
-
var { aggregationFns, autoResetExpanded = false, columnFilterDisplayMode = 'subheader', columnResizeDirection, columnResizeMode = 'onChange', createDisplayMode = 'modal', defaultColumn, defaultDisplayColumn, editDisplayMode = 'modal', enableBottomToolbar = true, enableColumnActions = true, enableColumnFilters = true, enableColumnOrdering = false, enableColumnPinning = false, enableColumnResizing = false, enableColumnVirtualization, enableDensityToggle = true, enableExpandAll = true, enableExpanding, enableFilterMatchHighlighting = true, enableFilters = true, enableFullScreenToggle = true, enableGlobalFilter = true, enableGlobalFilterRankedResults = true, enableGrouping = false, enableHiding = true, enableMultiRowSelection = true, enableMultiSort = true, enablePagination = true, enableRowPinning = false, enableRowSelection = false, enableRowVirtualization, enableSelectAll = true, enableSorting = true, enableStickyHeader = false, enableTableFooter = true, enableTableHead = true, enableToolbarInternalActions = true, enableTopToolbar = true, filterFns, icons, layoutMode, localization, manualFiltering, manualGrouping, manualPagination, manualSorting, paginationDisplayMode = 'default', positionActionsColumn = 'first', positionCreatingRow = 'top', positionExpandColumn = 'first', positionGlobalFilter = 'right', positionPagination = 'bottom', positionToolbarAlertBanner = 'top', positionToolbarDropZone = 'top', rowNumberDisplayMode = 'static', rowPinningDisplayMode = 'sticky', selectAllMode = 'page', sortingFns } = _a, rest = __rest(_a, ["aggregationFns", "autoResetExpanded", "columnFilterDisplayMode", "columnResizeDirection", "columnResizeMode", "createDisplayMode", "defaultColumn", "defaultDisplayColumn", "editDisplayMode", "enableBottomToolbar", "enableColumnActions", "enableColumnFilters", "enableColumnOrdering", "enableColumnPinning", "enableColumnResizing", "enableColumnVirtualization", "enableDensityToggle", "enableExpandAll", "enableExpanding", "enableFilterMatchHighlighting", "enableFilters", "enableFullScreenToggle", "enableGlobalFilter", "enableGlobalFilterRankedResults", "enableGrouping", "enableHiding", "enableMultiRowSelection", "enableMultiSort", "enablePagination", "enableRowPinning", "enableRowSelection", "enableRowVirtualization", "enableSelectAll", "enableSorting", "enableStickyHeader", "enableTableFooter", "enableTableHead", "enableToolbarInternalActions", "enableTopToolbar", "filterFns", "icons", "layoutMode", "localization", "manualFiltering", "manualGrouping", "manualPagination", "manualSorting", "paginationDisplayMode", "positionActionsColumn", "positionCreatingRow", "positionExpandColumn", "positionGlobalFilter", "positionPagination", "positionToolbarAlertBanner", "positionToolbarDropZone", "rowNumberDisplayMode", "rowPinningDisplayMode", "selectAllMode", "sortingFns"]);
|
1534
|
+
var { aggregationFns, autoResetExpanded = false, columnFilterDisplayMode = 'subheader', columnResizeDirection, columnResizeMode = 'onChange', createDisplayMode = 'modal', defaultColumn, defaultDisplayColumn, editDisplayMode = 'modal', enableBottomToolbar = true, enableColumnActions = true, enableColumnFilters = true, enableColumnOrdering = false, enableColumnPinning = false, enableColumnResizing = false, enableColumnVirtualization, enableDensityToggle = true, enableExpandAll = true, enableExpanding, enableFacetedValues = false, enableFilterMatchHighlighting = true, enableFilters = true, enableFullScreenToggle = true, enableGlobalFilter = true, enableGlobalFilterRankedResults = true, enableGrouping = false, enableHiding = true, enableMultiRowSelection = true, enableMultiSort = true, enablePagination = true, enableRowPinning = false, enableRowSelection = false, enableRowVirtualization, enableSelectAll = true, enableSorting = true, enableStickyHeader = false, enableTableFooter = true, enableTableHead = true, enableToolbarInternalActions = true, enableTopToolbar = true, filterFns, icons, layoutMode, localization, manualFiltering, manualGrouping, manualPagination, manualSorting, paginationDisplayMode = 'default', positionActionsColumn = 'first', positionCreatingRow = 'top', positionExpandColumn = 'first', positionGlobalFilter = 'right', positionPagination = 'bottom', positionToolbarAlertBanner = 'top', positionToolbarDropZone = 'top', rowNumberDisplayMode = 'static', rowPinningDisplayMode = 'sticky', selectAllMode = 'page', sortingFns } = _a, rest = __rest(_a, ["aggregationFns", "autoResetExpanded", "columnFilterDisplayMode", "columnResizeDirection", "columnResizeMode", "createDisplayMode", "defaultColumn", "defaultDisplayColumn", "editDisplayMode", "enableBottomToolbar", "enableColumnActions", "enableColumnFilters", "enableColumnOrdering", "enableColumnPinning", "enableColumnResizing", "enableColumnVirtualization", "enableDensityToggle", "enableExpandAll", "enableExpanding", "enableFacetedValues", "enableFilterMatchHighlighting", "enableFilters", "enableFullScreenToggle", "enableGlobalFilter", "enableGlobalFilterRankedResults", "enableGrouping", "enableHiding", "enableMultiRowSelection", "enableMultiSort", "enablePagination", "enableRowPinning", "enableRowSelection", "enableRowVirtualization", "enableSelectAll", "enableSorting", "enableStickyHeader", "enableTableFooter", "enableTableHead", "enableToolbarInternalActions", "enableTopToolbar", "filterFns", "icons", "layoutMode", "localization", "manualFiltering", "manualGrouping", "manualPagination", "manualSorting", "paginationDisplayMode", "positionActionsColumn", "positionCreatingRow", "positionExpandColumn", "positionGlobalFilter", "positionPagination", "positionToolbarAlertBanner", "positionToolbarDropZone", "rowNumberDisplayMode", "rowPinningDisplayMode", "selectAllMode", "sortingFns"]);
|
1525
1535
|
const theme = styles.useTheme();
|
1526
1536
|
icons = react.useMemo(() => (Object.assign(Object.assign({}, MRT_Default_Icons), icons)), [icons]);
|
1527
1537
|
localization = react.useMemo(() => (Object.assign(Object.assign({}, MRT_Localization_EN), localization)), [localization]);
|
@@ -1572,6 +1582,7 @@ const useMRT_TableOptions = (_a) => {
|
|
1572
1582
|
enableDensityToggle,
|
1573
1583
|
enableExpandAll,
|
1574
1584
|
enableExpanding,
|
1585
|
+
enableFacetedValues,
|
1575
1586
|
enableFilterMatchHighlighting,
|
1576
1587
|
enableFilters,
|
1577
1588
|
enableFullScreenToggle,
|
@@ -1592,8 +1603,15 @@ const useMRT_TableOptions = (_a) => {
|
|
1592
1603
|
enableTableHead,
|
1593
1604
|
enableToolbarInternalActions,
|
1594
1605
|
enableTopToolbar,
|
1595
|
-
filterFns,
|
1596
|
-
|
1606
|
+
filterFns, getCoreRowModel: reactTable.getCoreRowModel(), getExpandedRowModel: enableExpanding || enableGrouping ? reactTable.getExpandedRowModel() : undefined, getFacetedMinMaxValues: enableFacetedValues
|
1607
|
+
? reactTable.getFacetedMinMaxValues()
|
1608
|
+
: undefined, getFacetedRowModel: enableFacetedValues ? reactTable.getFacetedRowModel() : undefined, getFacetedUniqueValues: enableFacetedValues
|
1609
|
+
? reactTable.getFacetedUniqueValues()
|
1610
|
+
: undefined, getFilteredRowModel: enableColumnFilters || enableGlobalFilter || enableFilters
|
1611
|
+
? reactTable.getFilteredRowModel()
|
1612
|
+
: undefined, getGroupedRowModel: enableGrouping ? reactTable.getGroupedRowModel() : undefined, getPaginationRowModel: enablePagination
|
1613
|
+
? reactTable.getPaginationRowModel()
|
1614
|
+
: undefined, getSortedRowModel: enableSorting ? reactTable.getSortedRowModel() : undefined, getSubRows: (row) => row === null || row === void 0 ? void 0 : row.subRows, icons,
|
1597
1615
|
layoutMode,
|
1598
1616
|
localization,
|
1599
1617
|
manualFiltering,
|
@@ -1808,25 +1826,7 @@ const useMRT_TableInstance = (_tableOptions) => {
|
|
1808
1826
|
tableOptions.state.showSkeletons,
|
1809
1827
|
]);
|
1810
1828
|
//@ts-ignore
|
1811
|
-
const table = reactTable.useReactTable(Object.assign(Object.assign({
|
1812
|
-
? reactTable.getExpandedRowModel()
|
1813
|
-
: undefined, getFacetedMinMaxValues: tableOptions.enableFacetedValues
|
1814
|
-
? reactTable.getFacetedMinMaxValues()
|
1815
|
-
: undefined, getFacetedRowModel: tableOptions.enableFacetedValues
|
1816
|
-
? reactTable.getFacetedRowModel()
|
1817
|
-
: undefined, getFacetedUniqueValues: tableOptions.enableFacetedValues
|
1818
|
-
? reactTable.getFacetedUniqueValues()
|
1819
|
-
: undefined, getFilteredRowModel: tableOptions.enableColumnFilters ||
|
1820
|
-
tableOptions.enableGlobalFilter ||
|
1821
|
-
tableOptions.enableFilters
|
1822
|
-
? reactTable.getFilteredRowModel()
|
1823
|
-
: undefined, getGroupedRowModel: tableOptions.enableGrouping
|
1824
|
-
? reactTable.getGroupedRowModel()
|
1825
|
-
: undefined, getPaginationRowModel: tableOptions.enablePagination
|
1826
|
-
? reactTable.getPaginationRowModel()
|
1827
|
-
: undefined, getSortedRowModel: tableOptions.enableSorting
|
1828
|
-
? reactTable.getSortedRowModel()
|
1829
|
-
: undefined, getSubRows: (row) => row === null || row === void 0 ? void 0 : row.subRows, onColumnOrderChange,
|
1829
|
+
const table = reactTable.useReactTable(Object.assign(Object.assign({ onColumnOrderChange,
|
1830
1830
|
onColumnSizingInfoChange,
|
1831
1831
|
onGroupingChange,
|
1832
1832
|
onPaginationChange }, tableOptions), { globalFilterFn: (_u = tableOptions.filterFns) === null || _u === void 0 ? void 0 : _u[globalFilterFn !== null && globalFilterFn !== void 0 ? globalFilterFn : 'fuzzy'] }));
|
@@ -2230,7 +2230,9 @@ const MRT_EditCellTextField = (_a) => {
|
|
2230
2230
|
: {})), textFieldProps.InputProps), { sx: (theme) => {
|
2231
2231
|
var _a;
|
2232
2232
|
return (Object.assign({ mb: 0 }, parseFromValuesOrFunc((_a = textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.InputProps) === null || _a === void 0 ? void 0 : _a.sx, theme)));
|
2233
|
-
} }),
|
2233
|
+
} }), SelectProps: {
|
2234
|
+
MenuProps: { disableScrollLock: true },
|
2235
|
+
}, inputProps: Object.assign({ autoComplete: 'new-password' }, textFieldProps.inputProps), onBlur: handleBlur, onChange: handleChange, onClick: (e) => {
|
2234
2236
|
var _a;
|
2235
2237
|
e.stopPropagation();
|
2236
2238
|
(_a = textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.onClick) === null || _a === void 0 ? void 0 : _a.call(textFieldProps, e);
|
@@ -2373,9 +2375,7 @@ const MRT_TableBodyCell = (_a) => {
|
|
2373
2375
|
: undefined,
|
2374
2376
|
outlineOffset: '-1px',
|
2375
2377
|
textOverflow: 'clip',
|
2376
|
-
}, alignItems: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'center' : undefined, cursor: isEditable && editDisplayMode === 'cell' ? 'pointer' : 'inherit',
|
2377
|
-
? tableCellProps.align
|
2378
|
-
: undefined, overflow: 'hidden', p: density === 'compact'
|
2378
|
+
}, alignItems: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'center' : undefined, cursor: isEditable && editDisplayMode === 'cell' ? 'pointer' : 'inherit', overflow: 'hidden', p: density === 'compact'
|
2379
2379
|
? columnDefType === 'display'
|
2380
2380
|
? '0 0.5rem'
|
2381
2381
|
: '0.5rem'
|
@@ -2385,7 +2385,7 @@ const MRT_TableBodyCell = (_a) => {
|
|
2385
2385
|
: '1rem'
|
2386
2386
|
: columnDefType === 'display'
|
2387
2387
|
? '1rem 1.25rem'
|
2388
|
-
: '1.5rem', textOverflow: columnDefType !== 'display' ? 'ellipsis' : undefined, whiteSpace: row.getIsPinned() || density === 'compact' ? 'nowrap' : 'normal'
|
2388
|
+
: '1.5rem', textOverflow: columnDefType !== 'display' ? 'ellipsis' : undefined, whiteSpace: row.getIsPinned() || density === 'compact' ? 'nowrap' : 'normal' }, getCommonMRTCellStyles({
|
2389
2389
|
column,
|
2390
2390
|
table,
|
2391
2391
|
tableCellProps,
|
@@ -2502,25 +2502,21 @@ const MRT_TableBodyRow = ({ columnVirtualizer, numRows, pinnedRowIds, row, rowVi
|
|
2502
2502
|
}
|
2503
2503
|
}, selected: isRowSelected }, tableRowProps, { style: Object.assign({ transform: virtualRow
|
2504
2504
|
? `translateY(${virtualRow.start}px)`
|
2505
|
-
: undefined }, tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.style), sx: (theme) => (Object.assign({ '&:hover td':
|
2506
|
-
|
2507
|
-
? styles.alpha(cellHighlightColorHover, 0.3)
|
2508
|
-
: undefined }, pinnedBeforeAfterStyles),
|
2509
|
-
}, backgroundColor: `${baseBackgroundColor} !important`, bottom: !virtualRow && bottomPinnedIndex !== undefined && isRowPinned
|
2505
|
+
: undefined }, tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.style), sx: (theme) => (Object.assign({ '&:hover td:after': cellHighlightColorHover
|
2506
|
+
? Object.assign({ backgroundColor: styles.alpha(cellHighlightColorHover, 0.3) }, commonCellBeforeAfterStyles) : undefined, backgroundColor: `${baseBackgroundColor} !important`, bottom: !virtualRow && bottomPinnedIndex !== undefined && isRowPinned
|
2510
2507
|
? `${bottomPinnedIndex * rowHeight +
|
2511
2508
|
(enableStickyFooter ? tableFooterHeight - 1 : 0)}px`
|
2512
2509
|
: undefined, boxSizing: 'border-box', display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'flex' : undefined, opacity: isRowPinned ? 0.97 : isDraggingRow || isHoveredRow ? 0.5 : 1, position: virtualRow
|
2513
2510
|
? 'absolute'
|
2514
2511
|
: (rowPinningDisplayMode === null || rowPinningDisplayMode === void 0 ? void 0 : rowPinningDisplayMode.includes('sticky')) && isRowPinned
|
2515
2512
|
? 'sticky'
|
2516
|
-
:
|
2513
|
+
: 'relative', td: Object.assign({}, getCommonPinnedCellStyles({ table, theme })), 'td:after': cellHighlightColor
|
2514
|
+
? Object.assign({ backgroundColor: cellHighlightColor }, commonCellBeforeAfterStyles) : undefined, top: virtualRow
|
2517
2515
|
? 0
|
2518
2516
|
: topPinnedIndex !== undefined && isRowPinned
|
2519
2517
|
? `${topPinnedIndex * rowHeight +
|
2520
2518
|
(enableStickyHeader || isFullScreen ? tableHeadHeight - 1 : 0)}px`
|
2521
|
-
: undefined, transition: virtualRow ? 'none' : 'all 150ms ease-in-out', width: '100%', zIndex: (rowPinningDisplayMode === null || rowPinningDisplayMode === void 0 ? void 0 : rowPinningDisplayMode.includes('sticky')) && isRowPinned
|
2522
|
-
? 2
|
2523
|
-
: undefined }, sx)), children: [virtualPaddingLeft ? (jsxRuntime.jsx("td", { style: { display: 'flex', width: virtualPaddingLeft } })) : null, (virtualColumns !== null && virtualColumns !== void 0 ? virtualColumns : visibleCells).map((cellOrVirtualCell, staticColumnIndex) => {
|
2519
|
+
: undefined, transition: virtualRow ? 'none' : 'all 150ms ease-in-out', width: '100%', zIndex: (rowPinningDisplayMode === null || rowPinningDisplayMode === void 0 ? void 0 : rowPinningDisplayMode.includes('sticky')) && isRowPinned ? 2 : 0 }, sx)), children: [virtualPaddingLeft ? (jsxRuntime.jsx("td", { style: { display: 'flex', width: virtualPaddingLeft } })) : null, (virtualColumns !== null && virtualColumns !== void 0 ? virtualColumns : visibleCells).map((cellOrVirtualCell, staticColumnIndex) => {
|
2524
2520
|
let cell = cellOrVirtualCell;
|
2525
2521
|
if (columnVirtualizer) {
|
2526
2522
|
staticColumnIndex = cellOrVirtualCell.index;
|
@@ -2630,7 +2626,7 @@ const MRT_TableFooterCell = (_a) => {
|
|
2630
2626
|
var _b, _c, _d;
|
2631
2627
|
var { footer, staticColumnIndex, table } = _a, rest = __rest(_a, ["footer", "staticColumnIndex", "table"]);
|
2632
2628
|
const theme = styles.useTheme();
|
2633
|
-
const { getState, options: { enableColumnPinning,
|
2629
|
+
const { getState, options: { enableColumnPinning, muiTableFooterCellProps }, } = table;
|
2634
2630
|
const { density } = getState();
|
2635
2631
|
const { column } = footer;
|
2636
2632
|
const { columnDef } = column;
|
@@ -2644,12 +2640,13 @@ const MRT_TableFooterCell = (_a) => {
|
|
2644
2640
|
? 'center'
|
2645
2641
|
: theme.direction === 'rtl'
|
2646
2642
|
? 'right'
|
2647
|
-
: 'left', colSpan: footer.colSpan, "data-index": staticColumnIndex, "data-pinned": !!isColumnPinned || undefined, variant: "footer" }, tableCellProps, { sx: (theme) => (Object.assign(Object.assign({
|
2643
|
+
: 'left', colSpan: footer.colSpan, "data-index": staticColumnIndex, "data-pinned": !!isColumnPinned || undefined, variant: "footer" }, tableCellProps, { sx: (theme) => (Object.assign(Object.assign({ fontWeight: 'bold', p: density === 'compact'
|
2648
2644
|
? '0.5rem'
|
2649
2645
|
: density === 'comfortable'
|
2650
2646
|
? '1rem'
|
2651
|
-
: '1.5rem', verticalAlign: 'top'
|
2647
|
+
: '1.5rem', verticalAlign: 'top' }, getCommonMRTCellStyles({
|
2652
2648
|
column,
|
2649
|
+
header: footer,
|
2653
2650
|
table,
|
2654
2651
|
tableCellProps,
|
2655
2652
|
theme,
|
@@ -2676,7 +2673,7 @@ const MRT_TableFooterRow = (_a) => {
|
|
2676
2673
|
footerGroup,
|
2677
2674
|
table,
|
2678
2675
|
})), rest);
|
2679
|
-
return (jsxRuntime.jsxs(TableRow__default["default"], Object.assign({}, tableRowProps, { sx: (theme) => (Object.assign({ backgroundColor: getMRTTheme(table, theme).baseBackgroundColor, display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'flex' : undefined, width: '100%' }, parseFromValuesOrFunc(tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx, theme))), children: [virtualPaddingLeft ? (jsxRuntime.jsx("th", { style: { display: 'flex', width: virtualPaddingLeft } })) : null, (virtualColumns !== null && virtualColumns !== void 0 ? virtualColumns : footerGroup.headers).map((footerOrVirtualFooter, staticColumnIndex) => {
|
2676
|
+
return (jsxRuntime.jsxs(TableRow__default["default"], Object.assign({}, tableRowProps, { sx: (theme) => (Object.assign({ backgroundColor: getMRTTheme(table, theme).baseBackgroundColor, display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'flex' : undefined, position: 'relative', width: '100%' }, parseFromValuesOrFunc(tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx, theme))), children: [virtualPaddingLeft ? (jsxRuntime.jsx("th", { style: { display: 'flex', width: virtualPaddingLeft } })) : null, (virtualColumns !== null && virtualColumns !== void 0 ? virtualColumns : footerGroup.headers).map((footerOrVirtualFooter, staticColumnIndex) => {
|
2680
2677
|
let footer = footerOrVirtualFooter;
|
2681
2678
|
if (columnVirtualizer) {
|
2682
2679
|
staticColumnIndex = footerOrVirtualFooter
|
@@ -2705,7 +2702,7 @@ const MRT_TableFooter = (_a) => {
|
|
2705
2702
|
? theme.palette.mode === 'light'
|
2706
2703
|
? `1px solid ${theme.palette.grey[300]}`
|
2707
2704
|
: `1px solid ${theme.palette.grey[700]}`
|
2708
|
-
: undefined, position: stickFooter ? 'sticky' :
|
2705
|
+
: undefined, position: stickFooter ? 'sticky' : 'relative', zIndex: stickFooter ? 1 : undefined }, parseFromValuesOrFunc(tableFooterProps === null || tableFooterProps === void 0 ? void 0 : tableFooterProps.sx, theme))), children: getFooterGroups().map((footerGroup) => (jsxRuntime.jsx(MRT_TableFooterRow, { columnVirtualizer: columnVirtualizer, footerGroup: footerGroup, table: table }, footerGroup.id))) })));
|
2709
2706
|
};
|
2710
2707
|
|
2711
2708
|
const MRT_TableHeadCellColumnActionsButton = (_a) => {
|
@@ -2973,7 +2970,7 @@ const MRT_FilterTextField = (_a) => {
|
|
2973
2970
|
} }))) : isAutocompleteFilter ? (jsxRuntime.jsx(Autocomplete__default["default"], Object.assign({ freeSolo: true, getOptionLabel: (option) => getValueAndLabel(option).label, onChange: (_e, newValue) => handleChange(getValueAndLabel(newValue).value), options: (_t = dropdownOptions === null || dropdownOptions === void 0 ? void 0 : dropdownOptions.map((option) => getValueAndLabel(option))) !== null && _t !== void 0 ? _t : [] }, autocompleteProps, { renderInput: (builtinTextFieldProps) => {
|
2974
2971
|
var _a;
|
2975
2972
|
return (jsxRuntime.jsx(TextField__default["default"], Object.assign({}, builtinTextFieldProps, commonTextFieldProps, { InputProps: Object.assign(Object.assign({}, builtinTextFieldProps.InputProps), { startAdornment: (_a = commonTextFieldProps === null || commonTextFieldProps === void 0 ? void 0 : commonTextFieldProps.InputProps) === null || _a === void 0 ? void 0 : _a.startAdornment }), inputProps: Object.assign(Object.assign({}, builtinTextFieldProps.inputProps), commonTextFieldProps === null || commonTextFieldProps === void 0 ? void 0 : commonTextFieldProps.inputProps), onChange: handleTextFieldChange, onClick: (e) => e.stopPropagation() })));
|
2976
|
-
}, value: filterValue }))) : (jsxRuntime.jsx(TextField__default["default"], Object.assign({ select: isSelectFilter || isMultiSelectFilter }, commonTextFieldProps, { SelectProps: Object.assign({ displayEmpty: true, multiple: isMultiSelectFilter, renderValue: isMultiSelectFilter
|
2973
|
+
}, value: filterValue }))) : (jsxRuntime.jsx(TextField__default["default"], Object.assign({ select: isSelectFilter || isMultiSelectFilter }, commonTextFieldProps, { SelectProps: Object.assign({ MenuProps: { disableScrollLock: true }, displayEmpty: true, multiple: isMultiSelectFilter, renderValue: isMultiSelectFilter
|
2977
2974
|
? (selected) => !(selected === null || selected === void 0 ? void 0 : selected.length) ? (jsxRuntime.jsx(Box__default["default"], { sx: { opacity: 0.5 }, children: filterPlaceholder })) : (jsxRuntime.jsx(Box__default["default"], { sx: { display: 'flex', flexWrap: 'wrap', gap: '2px' }, children: selected === null || selected === void 0 ? void 0 : selected.map((value) => {
|
2978
2975
|
const selectedValue = dropdownOptions === null || dropdownOptions === void 0 ? void 0 : dropdownOptions.find((option) => getValueAndLabel(option).value === value);
|
2979
2976
|
return (jsxRuntime.jsx(Chip__default["default"], { label: getValueAndLabel(selectedValue).label }, value));
|
@@ -3350,11 +3347,7 @@ const MRT_TableHeadCell = (_a) => {
|
|
3350
3347
|
? '0.25rem'
|
3351
3348
|
: density === 'comfortable'
|
3352
3349
|
? '.75rem'
|
3353
|
-
: '1.25rem', userSelect: enableMultiSort && column.getCanSort() ? 'none' : undefined, verticalAlign: 'top',
|
3354
|
-
? 3
|
3355
|
-
: column.getIsPinned() && columnDefType !== 'group'
|
3356
|
-
? 2
|
3357
|
-
: 1 }, getCommonMRTCellStyles({
|
3350
|
+
: '1.25rem', userSelect: enableMultiSort && column.getCanSort() ? 'none' : undefined, verticalAlign: 'top' }, getCommonMRTCellStyles({
|
3358
3351
|
column,
|
3359
3352
|
header,
|
3360
3353
|
table,
|
@@ -3404,13 +3397,15 @@ const MRT_TableHeadCell = (_a) => {
|
|
3404
3397
|
|
3405
3398
|
const MRT_TableHeadRow = (_a) => {
|
3406
3399
|
var { columnVirtualizer, headerGroup, table } = _a, rest = __rest(_a, ["columnVirtualizer", "headerGroup", "table"]);
|
3407
|
-
const { options: { layoutMode, muiTableHeadRowProps }, } = table;
|
3400
|
+
const { options: { enableStickyHeader, layoutMode, muiTableHeadRowProps }, } = table;
|
3408
3401
|
const { virtualColumns, virtualPaddingLeft, virtualPaddingRight } = columnVirtualizer !== null && columnVirtualizer !== void 0 ? columnVirtualizer : {};
|
3409
3402
|
const tableRowProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiTableHeadRowProps, {
|
3410
3403
|
headerGroup,
|
3411
3404
|
table,
|
3412
3405
|
})), rest);
|
3413
|
-
return (jsxRuntime.jsxs(TableRow__default["default"], Object.assign({}, tableRowProps, { sx: (theme) => (Object.assign({ backgroundColor: getMRTTheme(table, theme).baseBackgroundColor, boxShadow: `4px 0 8px ${styles.alpha(theme.palette.common.black, 0.1)}`, display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'flex' : undefined,
|
3406
|
+
return (jsxRuntime.jsxs(TableRow__default["default"], Object.assign({}, tableRowProps, { sx: (theme) => (Object.assign({ backgroundColor: getMRTTheme(table, theme).baseBackgroundColor, boxShadow: `4px 0 8px ${styles.alpha(theme.palette.common.black, 0.1)}`, display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'flex' : undefined, position: enableStickyHeader && layoutMode === 'semantic'
|
3407
|
+
? 'sticky'
|
3408
|
+
: 'relative', top: 0 }, parseFromValuesOrFunc(tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx, theme))), children: [virtualPaddingLeft ? (jsxRuntime.jsx("th", { style: { display: 'flex', width: virtualPaddingLeft } })) : null, (virtualColumns !== null && virtualColumns !== void 0 ? virtualColumns : headerGroup.headers).map((headerOrVirtualHeader, staticColumnIndex) => {
|
3414
3409
|
let header = headerOrVirtualHeader;
|
3415
3410
|
if (columnVirtualizer) {
|
3416
3411
|
staticColumnIndex = headerOrVirtualHeader
|
@@ -3507,7 +3502,7 @@ const MRT_Table = (_a) => {
|
|
3507
3502
|
columnVirtualizer,
|
3508
3503
|
table,
|
3509
3504
|
};
|
3510
|
-
return (jsxRuntime.jsxs(Table__default["default"], Object.assign({ stickyHeader: enableStickyHeader || isFullScreen }, tableProps, { style: Object.assign(Object.assign({}, columnSizeVars), tableProps === null || tableProps === void 0 ? void 0 : tableProps.style), sx: (theme) => (Object.assign({ borderCollapse: 'separate', display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : undefined }, parseFromValuesOrFunc(tableProps === null || tableProps === void 0 ? void 0 : tableProps.sx, theme))), children: [!!Caption && jsxRuntime.jsx("caption", { children: Caption }), enableTableHead && jsxRuntime.jsx(MRT_TableHead, Object.assign({}, commonTableGroupProps)), memoMode === 'table-body' || columnSizingInfo.isResizingColumn ? (jsxRuntime.jsx(Memo_MRT_TableBody, Object.assign({}, commonTableGroupProps))) : (jsxRuntime.jsx(MRT_TableBody, Object.assign({}, commonTableGroupProps))), enableTableFooter && jsxRuntime.jsx(MRT_TableFooter, Object.assign({}, commonTableGroupProps))] })));
|
3505
|
+
return (jsxRuntime.jsxs(Table__default["default"], Object.assign({ stickyHeader: enableStickyHeader || isFullScreen }, tableProps, { style: Object.assign(Object.assign({}, columnSizeVars), tableProps === null || tableProps === void 0 ? void 0 : tableProps.style), sx: (theme) => (Object.assign({ borderCollapse: 'separate', display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : undefined, position: 'relative' }, parseFromValuesOrFunc(tableProps === null || tableProps === void 0 ? void 0 : tableProps.sx, theme))), children: [!!Caption && jsxRuntime.jsx("caption", { children: Caption }), enableTableHead && jsxRuntime.jsx(MRT_TableHead, Object.assign({}, commonTableGroupProps)), memoMode === 'table-body' || columnSizingInfo.isResizingColumn ? (jsxRuntime.jsx(Memo_MRT_TableBody, Object.assign({}, commonTableGroupProps))) : (jsxRuntime.jsx(MRT_TableBody, Object.assign({}, commonTableGroupProps))), enableTableFooter && jsxRuntime.jsx(MRT_TableFooter, Object.assign({}, commonTableGroupProps))] })));
|
3511
3506
|
};
|
3512
3507
|
|
3513
3508
|
const MRT_TableLoadingOverlay = (_a) => {
|
@@ -3628,6 +3623,7 @@ const defaultRowsPerPage = [5, 10, 15, 20, 25, 30, 50, 100];
|
|
3628
3623
|
const MRT_TablePagination = (_a) => {
|
3629
3624
|
var { position = 'bottom', table } = _a, rest = __rest(_a, ["position", "table"]);
|
3630
3625
|
const theme = styles.useTheme();
|
3626
|
+
const isMobile = useMediaQuery__default["default"]('(max-width: 720px)');
|
3631
3627
|
const { getPrePaginationRowModel, getState, options: { enableToolbarInternalActions, icons: { ChevronLeftIcon, ChevronRightIcon, FirstPageIcon, LastPageIcon }, localization, muiPaginationProps, paginationDisplayMode, rowCount, }, setPageIndex, setPageSize, } = table;
|
3632
3628
|
const { pagination: { pageIndex = 0, pageSize = 10 }, showGlobalFilter, } = getState();
|
3633
3629
|
const paginationProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiPaginationProps, {
|
@@ -3638,9 +3634,12 @@ const MRT_TablePagination = (_a) => {
|
|
3638
3634
|
const showFirstLastPageButtons = numberOfPages > 2;
|
3639
3635
|
const firstRowIndex = pageIndex * pageSize;
|
3640
3636
|
const lastRowIndex = Math.min(pageIndex * pageSize + pageSize, totalRowCount);
|
3641
|
-
const _b = paginationProps !== null && paginationProps !== void 0 ? paginationProps : {}, { SelectProps, disabled = false, rowsPerPageOptions = defaultRowsPerPage, showFirstButton = showFirstLastPageButtons, showLastButton = showFirstLastPageButtons, showRowsPerPage = true } = _b,
|
3637
|
+
const _b = paginationProps !== null && paginationProps !== void 0 ? paginationProps : {}, { SelectProps = {}, disabled = false, rowsPerPageOptions = defaultRowsPerPage, showFirstButton = showFirstLastPageButtons, showLastButton = showFirstLastPageButtons, showRowsPerPage = true } = _b, restPaginationProps = __rest(_b, ["SelectProps", "disabled", "rowsPerPageOptions", "showFirstButton", "showLastButton", "showRowsPerPage"]);
|
3642
3638
|
const disableBack = pageIndex <= 0 || disabled;
|
3643
3639
|
const disableNext = lastRowIndex >= totalRowCount || disabled;
|
3640
|
+
if (isMobile && (SelectProps === null || SelectProps === void 0 ? void 0 : SelectProps.native) !== false) {
|
3641
|
+
SelectProps.native = true;
|
3642
|
+
}
|
3644
3643
|
const tooltipProps = getCommonTooltipProps();
|
3645
3644
|
return (jsxRuntime.jsxs(Box__default["default"], { className: "MuiTablePagination-root", sx: {
|
3646
3645
|
alignItems: 'center',
|
@@ -3658,7 +3657,10 @@ const MRT_TablePagination = (_a) => {
|
|
3658
3657
|
px: '8px',
|
3659
3658
|
py: '12px',
|
3660
3659
|
zIndex: 2,
|
3661
|
-
}, children: [showRowsPerPage && (jsxRuntime.jsxs(Box__default["default"], { sx: { alignItems: 'center', display: 'flex', gap: '8px' }, children: [jsxRuntime.jsx(InputLabel__default["default"], { htmlFor: "mrt-rows-per-page", sx: { mb: 0 }, children: localization.rowsPerPage }), jsxRuntime.jsx(Select__default["default"], Object.assign({
|
3660
|
+
}, children: [showRowsPerPage && (jsxRuntime.jsxs(Box__default["default"], { sx: { alignItems: 'center', display: 'flex', gap: '8px' }, children: [jsxRuntime.jsx(InputLabel__default["default"], { htmlFor: "mrt-rows-per-page", sx: { mb: 0 }, children: localization.rowsPerPage }), jsxRuntime.jsx(Select__default["default"], Object.assign({ MenuProps: { disableScrollLock: true }, disableUnderline: true, disabled: disabled, inputProps: {
|
3661
|
+
'aria-label': localization.rowsPerPage,
|
3662
|
+
id: 'mrt-rows-per-page',
|
3663
|
+
}, label: localization.rowsPerPage, onChange: (event) => setPageSize(+event.target.value), sx: { mb: 0 }, value: pageSize, variant: "standard" }, SelectProps, { children: rowsPerPageOptions.map((option) => {
|
3662
3664
|
var _a;
|
3663
3665
|
const value = typeof option !== 'number' ? option.value : option;
|
3664
3666
|
const label = typeof option !== 'number' ? option.label : `${option}`;
|
@@ -3668,7 +3670,7 @@ const MRT_TablePagination = (_a) => {
|
|
3668
3670
|
last: LastPageIcon,
|
3669
3671
|
next: ChevronRightIcon,
|
3670
3672
|
previous: ChevronLeftIcon,
|
3671
|
-
} }, item))), showFirstButton: showFirstButton, showLastButton: showLastButton },
|
3673
|
+
} }, item))), showFirstButton: showFirstButton, showLastButton: showLastButton }, restPaginationProps))) : paginationDisplayMode === 'default' ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography__default["default"], { align: "center", component: "span", sx: { m: '0 4px', minWidth: '8ch' }, variant: "body2", children: `${lastRowIndex === 0 ? 0 : (firstRowIndex + 1).toLocaleString()}-${lastRowIndex.toLocaleString()} ${localization.of} ${totalRowCount.toLocaleString()}` }), jsxRuntime.jsxs(Box__default["default"], { gap: "xs", children: [showFirstButton && (jsxRuntime.jsx(Tooltip__default["default"], Object.assign({}, tooltipProps, { title: localization.goToFirstPage, children: jsxRuntime.jsx("span", { children: jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.goToFirstPage, disabled: disableBack, onClick: () => setPageIndex(0), size: "small", children: jsxRuntime.jsx(FirstPageIcon, Object.assign({}, flipIconStyles(theme))) }) }) }))), jsxRuntime.jsx(Tooltip__default["default"], Object.assign({}, tooltipProps, { title: localization.goToPreviousPage, children: jsxRuntime.jsx("span", { children: jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.goToPreviousPage, disabled: disableBack, onClick: () => setPageIndex(pageIndex - 1), size: "small", children: jsxRuntime.jsx(ChevronLeftIcon, Object.assign({}, flipIconStyles(theme))) }) }) })), jsxRuntime.jsx(Tooltip__default["default"], Object.assign({}, tooltipProps, { title: localization.goToNextPage, children: jsxRuntime.jsx("span", { children: jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.goToNextPage, disabled: disableNext, onClick: () => setPageIndex(pageIndex + 1), size: "small", children: jsxRuntime.jsx(ChevronRightIcon, Object.assign({}, flipIconStyles(theme))) }) }) })), showLastButton && (jsxRuntime.jsx(Tooltip__default["default"], Object.assign({}, tooltipProps, { title: localization.goToLastPage, children: jsxRuntime.jsx("span", { children: jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.goToLastPage, disabled: disableNext, onClick: () => setPageIndex(numberOfPages - 1), size: "small", children: jsxRuntime.jsx(LastPageIcon, Object.assign({}, flipIconStyles(theme))) }) }) })))] })] })) : null] }));
|
3672
3674
|
};
|
3673
3675
|
|
3674
3676
|
const MRT_ToolbarDropZone = (_a) => {
|
@@ -3841,7 +3843,7 @@ const MRT_ShowHideColumnsMenu = (_a) => {
|
|
3841
3843
|
sx: {
|
3842
3844
|
backgroundColor: menuBackgroundColor,
|
3843
3845
|
},
|
3844
|
-
}, anchorEl: anchorEl, onClose: () => setAnchorEl(null), open: !!anchorEl }, rest, { children: [jsxRuntime.jsxs(Box__default["default"], { sx: {
|
3846
|
+
}, anchorEl: anchorEl, disableScrollLock: true, onClose: () => setAnchorEl(null), open: !!anchorEl }, rest, { children: [jsxRuntime.jsxs(Box__default["default"], { sx: {
|
3845
3847
|
display: 'flex',
|
3846
3848
|
justifyContent: 'space-between',
|
3847
3849
|
p: '0.5rem',
|