material-react-table 2.0.0-beta.0 → 2.0.0-beta.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.
package/README.md CHANGED
@@ -120,7 +120,7 @@ npm install material-react-table
120
120
  > Read the full usage docs [here](https://www.material-react-table.com/docs/getting-started/usage/)
121
121
 
122
122
  ```jsx
123
- import React, { useMemo, useRef, useState, useEffect } from 'react';
123
+ import { useMemo, useRef, useState, useEffect } from 'react';
124
124
  import { MaterialReactTable } from 'material-react-table';
125
125
 
126
126
  const data = [
package/dist/cjs/index.js CHANGED
@@ -620,11 +620,11 @@ const MRT_EditCellTextField = ({ cell, table, }) => {
620
620
  textFieldProps.inputRef = inputRef;
621
621
  }
622
622
  }
623
- }, label: ['custom', 'modal'].includes((isCreating ? createDisplayMode : editDisplayMode))
624
- ? column.columnDef.header
623
+ }, label: !['custom', 'modal'].includes((isCreating ? createDisplayMode : editDisplayMode))
624
+ ? columnDef.header
625
625
  : undefined, margin: "none", name: column.id, placeholder: !['custom', 'modal'].includes((isCreating ? createDisplayMode : editDisplayMode))
626
626
  ? columnDef.header
627
- : undefined, select: isSelectEdit, value: value, variant: "standard" }, textFieldProps, { onBlur: handleBlur, onChange: handleChange, onClick: (e) => {
627
+ : undefined, select: isSelectEdit, value: value, variant: "standard" }, textFieldProps, { InputProps: Object.assign({ disableUnderline: editDisplayMode === 'table' }, textFieldProps.InputProps), inputProps: Object.assign({ autoComplete: 'new-password' }, textFieldProps.inputProps), onBlur: handleBlur, onChange: handleChange, onClick: (e) => {
628
628
  var _a;
629
629
  e.stopPropagation();
630
630
  (_a = textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.onClick) === null || _a === void 0 ? void 0 : _a.call(textFieldProps, e);
@@ -652,7 +652,7 @@ const MRT_TableBodyCell = ({ cell, measureElement, numRows, rowIndex, rowRef, ta
652
652
  var _a, _b, _c, _d;
653
653
  const theme = styles.useTheme();
654
654
  const { getState, options: { createDisplayMode, editDisplayMode, enableClickToCopy, enableColumnOrdering, enableEditing, enableGrouping, enableRowNumbers, layoutMode, muiSkeletonProps, muiTableBodyCellProps, rowNumberMode, }, refs: { editInputRefs }, setEditingCell, setHoveredColumn, } = table;
655
- const { creatingRow, density, draggingColumn, draggingRow, editingCell, editingRow, hoveredColumn, hoveredRow, isLoading, showSkeletons, } = getState();
655
+ const { columnSizingInfo, creatingRow, density, draggingColumn, draggingRow, editingCell, editingRow, hoveredColumn, hoveredRow, isLoading, showSkeletons, } = getState();
656
656
  const { column, row } = cell;
657
657
  const { columnDef } = column;
658
658
  const { columnDefType } = columnDef;
@@ -689,12 +689,17 @@ const MRT_TableBodyCell = ({ cell, measureElement, numRows, rowIndex, rowRef, ta
689
689
  const isHoveredRow = (hoveredRow === null || hoveredRow === void 0 ? void 0 : hoveredRow.id) === row.id;
690
690
  const isFirstColumn = getIsFirstColumn(column, table);
691
691
  const isLastColumn = getIsLastColumn(column, table);
692
- const isLastRow = rowIndex === numRows - 1;
692
+ const isLastRow = numRows && rowIndex === numRows - 1;
693
693
  const borderStyle = isDraggingColumn || isDraggingRow
694
694
  ? `1px dashed ${theme.palette.text.secondary} !important`
695
- : isHoveredColumn || isHoveredRow
695
+ : isHoveredColumn ||
696
+ isHoveredRow ||
697
+ columnSizingInfo.isResizingColumn === column.id
696
698
  ? `2px dashed ${theme.palette.primary.main} !important`
697
699
  : undefined;
700
+ if (columnSizingInfo.isResizingColumn === column.id) {
701
+ return { borderRight: borderStyle };
702
+ }
698
703
  return borderStyle
699
704
  ? {
700
705
  borderBottom: isDraggingRow || isHoveredRow || isLastRow
@@ -713,7 +718,14 @@ const MRT_TableBodyCell = ({ cell, measureElement, numRows, rowIndex, rowRef, ta
713
718
  borderTop: isDraggingRow || isHoveredRow ? borderStyle : undefined,
714
719
  }
715
720
  : undefined;
716
- }, [draggingColumn, draggingRow, hoveredColumn, hoveredRow, rowIndex]);
721
+ }, [
722
+ columnSizingInfo.isResizingColumn,
723
+ draggingColumn,
724
+ draggingRow,
725
+ hoveredColumn,
726
+ hoveredRow,
727
+ rowIndex,
728
+ ]);
717
729
  const isEditable = parseFromValuesOrFunc(enableEditing, row) &&
718
730
  parseFromValuesOrFunc(columnDef.enableEditing, row) !== false;
719
731
  const isEditing = isEditable &&
@@ -820,7 +832,7 @@ const MRT_TableDetailPanel = ({ parentRowRef, row, rowIndex, table, virtualRow,
820
832
  : undefined, width: '100%', zIndex: virtualRow ? 2 : undefined }, parseFromValuesOrFunc(tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx, theme)));
821
833
  }, children: jsxRuntime.jsx(TableCell__default["default"], Object.assign({ className: "Mui-TableBodyCell-DetailPanel", colSpan: getVisibleLeafColumns().length }, tableCellProps, { sx: (theme) => (Object.assign({ backgroundColor: virtualRow
822
834
  ? styles.lighten(theme.palette.background.default, 0.05)
823
- : undefined, borderBottom: !row.getIsExpanded() ? 'none' : undefined, display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'flex' : 'table-cell', pb: row.getIsExpanded() ? '1rem' : 0, pt: row.getIsExpanded() ? '1rem' : 0, transition: 'all 150ms ease-in-out', width: `${table.getTotalSize()}px` }, parseFromValuesOrFunc(tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx, theme))), children: renderDetailPanel && (jsxRuntime.jsx(Collapse__default["default"], { in: row.getIsExpanded(), mountOnEnter: true, unmountOnExit: true, children: !isLoading && renderDetailPanel({ row, table }) })) })) })));
835
+ : undefined, borderBottom: !row.getIsExpanded() ? 'none' : undefined, display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'flex' : 'table-cell', py: row.getIsExpanded() ? '1rem' : 0, transition: 'all 150ms ease-in-out', width: `${table.getTotalSize()}px` }, parseFromValuesOrFunc(tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx, theme))), children: renderDetailPanel && (jsxRuntime.jsx(Collapse__default["default"], { in: row.getIsExpanded(), mountOnEnter: true, unmountOnExit: true, children: !isLoading && renderDetailPanel({ row, table }) })) })) })));
824
836
  };
825
837
 
826
838
  const MRT_TableBodyRow = ({ columnVirtualizer, measureElement, numRows, pinnedRowIds, row, rowIndex, table, virtualColumns, virtualPaddingLeft, virtualPaddingRight, virtualRow, }) => {
@@ -940,8 +952,8 @@ const rankGlobalFuzzy = (rowA, rowB) => Math.max(...Object.values(rowB.columnFil
940
952
 
941
953
  const MRT_TableBody = ({ columnVirtualizer, table, virtualColumns, virtualPaddingLeft, virtualPaddingRight, }) => {
942
954
  var _a, _b, _c, _d, _e, _f;
943
- const { getBottomRows, getCenterRows, getIsSomeRowsPinned, getPrePaginationRowModel, getRowModel, getState, getTopRows, options: { enableGlobalFilterRankedResults, enablePagination, enableRowPinning, enableRowVirtualization, enableStickyFooter, enableStickyHeader, layoutMode, localization, manualExpanding, manualFiltering, manualGrouping, manualPagination, manualSorting, memoMode, muiTableBodyProps, renderEmptyRowsFallback, rowPinningDisplayMode, rowVirtualizerInstanceRef, rowVirtualizerOptions, }, refs: { tableContainerRef, tableFooterRef, tableHeadRef, tablePaperRef }, } = table;
944
- const { columnFilters, density, draggingRow, expanded, globalFilter, isFullScreen, pagination, rowPinning, sorting, } = getState();
955
+ const { getBottomRows, getCenterRows, getIsSomeRowsPinned, getPrePaginationRowModel, getRowModel, getState, getTopRows, options: { createDisplayMode, enableGlobalFilterRankedResults, enablePagination, enableRowPinning, enableRowVirtualization, enableStickyFooter, enableStickyHeader, layoutMode, localization, manualExpanding, manualFiltering, manualGrouping, manualPagination, manualSorting, memoMode, muiTableBodyProps, renderEmptyRowsFallback, rowPinningDisplayMode, rowVirtualizerInstanceRef, rowVirtualizerOptions, }, refs: { tableContainerRef, tableFooterRef, tableHeadRef, tablePaperRef }, } = table;
956
+ const { columnFilters, creatingRow, density, draggingRow, expanded, globalFilter, isFullScreen, pagination, rowPinning, sorting, } = getState();
945
957
  const tableBodyProps = parseFromValuesOrFunc(muiTableBodyProps, { table });
946
958
  const rowVirtualizerProps = parseFromValuesOrFunc(rowVirtualizerOptions, {
947
959
  table,
@@ -1024,44 +1036,44 @@ const MRT_TableBody = ({ columnVirtualizer, table, virtualColumns, virtualPaddin
1024
1036
  virtualPaddingRight,
1025
1037
  };
1026
1038
  return memoMode === 'rows' ? (jsxRuntime.jsx(Memo_MRT_TableBodyRow, Object.assign({}, props), row.id)) : (jsxRuntime.jsx(MRT_TableBodyRow, Object.assign({}, props), row.id));
1027
- }) }))), jsxRuntime.jsx(TableBody__default["default"], Object.assign({}, tableBodyProps, { sx: (theme) => (Object.assign({ display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : undefined, height: rowVirtualizer
1039
+ }) }))), jsxRuntime.jsxs(TableBody__default["default"], Object.assign({}, tableBodyProps, { sx: (theme) => (Object.assign({ display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : undefined, height: rowVirtualizer
1028
1040
  ? `${rowVirtualizer.getTotalSize()}px`
1029
- : 'inherit', minHeight: !rows.length ? '100px' : undefined, position: 'relative' }, parseFromValuesOrFunc(tableBodyProps === null || tableBodyProps === void 0 ? void 0 : tableBodyProps.sx, theme))), children: (_c = tableBodyProps === null || tableBodyProps === void 0 ? void 0 : tableBodyProps.children) !== null && _c !== void 0 ? _c : (!rows.length ? (jsxRuntime.jsx("tr", { style: {
1030
- display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : undefined,
1031
- }, children: jsxRuntime.jsx("td", { colSpan: table.getVisibleLeafColumns().length, style: {
1032
- display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid'))
1033
- ? 'grid'
1034
- : 'table-cell',
1035
- }, children: (_d = renderEmptyRowsFallback === null || renderEmptyRowsFallback === void 0 ? void 0 : renderEmptyRowsFallback({ table })) !== null && _d !== void 0 ? _d : (jsxRuntime.jsx(Typography__default["default"], { sx: {
1036
- color: 'text.secondary',
1037
- fontStyle: 'italic',
1038
- maxWidth: `min(100vw, ${(_f = (_e = tablePaperRef.current) === null || _e === void 0 ? void 0 : _e.clientWidth) !== null && _f !== void 0 ? _f : 360}px)`,
1039
- py: '2rem',
1040
- textAlign: 'center',
1041
- width: '100%',
1042
- }, children: globalFilter || columnFilters.length
1043
- ? localization.noResultsFound
1044
- : localization.noRecordsToDisplay })) }) })) : (jsxRuntime.jsx(jsxRuntime.Fragment, { children: (virtualRows !== null && virtualRows !== void 0 ? virtualRows : rows).map((rowOrVirtualRow, rowIndex) => {
1045
- const row = rowVirtualizer
1046
- ? rows[rowOrVirtualRow.index]
1047
- : rowOrVirtualRow;
1048
- const props = {
1049
- columnVirtualizer,
1050
- measureElement: rowVirtualizer === null || rowVirtualizer === void 0 ? void 0 : rowVirtualizer.measureElement,
1051
- numRows: rows.length,
1052
- pinnedRowIds,
1053
- row,
1054
- rowIndex: rowVirtualizer ? rowOrVirtualRow.index : rowIndex,
1055
- table,
1056
- virtualColumns,
1057
- virtualPaddingLeft,
1058
- virtualPaddingRight,
1059
- virtualRow: rowVirtualizer
1060
- ? rowOrVirtualRow
1061
- : undefined,
1062
- };
1063
- return memoMode === 'rows' ? (jsxRuntime.jsx(Memo_MRT_TableBodyRow, Object.assign({}, props), row.id)) : (jsxRuntime.jsx(MRT_TableBodyRow, Object.assign({}, props), row.id));
1064
- }) }))) })), !(rowPinningDisplayMode === null || rowPinningDisplayMode === void 0 ? void 0 : rowPinningDisplayMode.includes('sticky')) &&
1041
+ : 'inherit', minHeight: !rows.length ? '100px' : undefined, position: 'relative' }, parseFromValuesOrFunc(tableBodyProps === null || tableBodyProps === void 0 ? void 0 : tableBodyProps.sx, theme))), children: [creatingRow && createDisplayMode === 'row' && (jsxRuntime.jsx(MRT_TableBodyRow, { row: creatingRow, rowIndex: -1, table: table })), (_c = tableBodyProps === null || tableBodyProps === void 0 ? void 0 : tableBodyProps.children) !== null && _c !== void 0 ? _c : (!rows.length ? (jsxRuntime.jsx("tr", { style: {
1042
+ display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : undefined,
1043
+ }, children: jsxRuntime.jsx("td", { colSpan: table.getVisibleLeafColumns().length, style: {
1044
+ display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid'))
1045
+ ? 'grid'
1046
+ : 'table-cell',
1047
+ }, children: (_d = renderEmptyRowsFallback === null || renderEmptyRowsFallback === void 0 ? void 0 : renderEmptyRowsFallback({ table })) !== null && _d !== void 0 ? _d : (jsxRuntime.jsx(Typography__default["default"], { sx: {
1048
+ color: 'text.secondary',
1049
+ fontStyle: 'italic',
1050
+ maxWidth: `min(100vw, ${(_f = (_e = tablePaperRef.current) === null || _e === void 0 ? void 0 : _e.clientWidth) !== null && _f !== void 0 ? _f : 360}px)`,
1051
+ py: '2rem',
1052
+ textAlign: 'center',
1053
+ width: '100%',
1054
+ }, children: globalFilter || columnFilters.length
1055
+ ? localization.noResultsFound
1056
+ : localization.noRecordsToDisplay })) }) })) : (jsxRuntime.jsx(jsxRuntime.Fragment, { children: (virtualRows !== null && virtualRows !== void 0 ? virtualRows : rows).map((rowOrVirtualRow, rowIndex) => {
1057
+ const row = rowVirtualizer
1058
+ ? rows[rowOrVirtualRow.index]
1059
+ : rowOrVirtualRow;
1060
+ const props = {
1061
+ columnVirtualizer,
1062
+ measureElement: rowVirtualizer === null || rowVirtualizer === void 0 ? void 0 : rowVirtualizer.measureElement,
1063
+ numRows: rows.length,
1064
+ pinnedRowIds,
1065
+ row,
1066
+ rowIndex: rowVirtualizer ? rowOrVirtualRow.index : rowIndex,
1067
+ table,
1068
+ virtualColumns,
1069
+ virtualPaddingLeft,
1070
+ virtualPaddingRight,
1071
+ virtualRow: rowVirtualizer
1072
+ ? rowOrVirtualRow
1073
+ : undefined,
1074
+ };
1075
+ return memoMode === 'rows' ? (jsxRuntime.jsx(Memo_MRT_TableBodyRow, Object.assign({}, props), row.id)) : (jsxRuntime.jsx(MRT_TableBodyRow, Object.assign({}, props), row.id));
1076
+ }) })))] })), !(rowPinningDisplayMode === null || rowPinningDisplayMode === void 0 ? void 0 : rowPinningDisplayMode.includes('sticky')) &&
1065
1077
  getIsSomeRowsPinned('bottom') && (jsxRuntime.jsx(TableBody__default["default"], Object.assign({}, tableBodyProps, { sx: (theme) => (Object.assign({ bottom: tableFooterHeight - 1, display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : undefined, position: 'sticky', zIndex: 1 }, parseFromValuesOrFunc(tableBodyProps === null || tableBodyProps === void 0 ? void 0 : tableBodyProps.sx, theme))), children: getBottomRows().map((row, rowIndex) => {
1066
1078
  const props = {
1067
1079
  columnVirtualizer,
@@ -1953,13 +1965,17 @@ const MRT_TableHeadCellResizeHandle = ({ header, table, }) => {
1953
1965
  }, sx: (theme) => ({
1954
1966
  '&:active > hr': {
1955
1967
  backgroundColor: theme.palette.info.main,
1956
- opacity: 1,
1968
+ opacity: header.subHeaders.length ? 1 : 0,
1957
1969
  },
1958
1970
  cursor: 'col-resize',
1959
- mr: density === 'compact' ? '-0.75rem' : '-1rem',
1971
+ mr: density === 'compact'
1972
+ ? '-12px'
1973
+ : density === 'comfortable'
1974
+ ? '-20px'
1975
+ : '-28px',
1960
1976
  position: 'absolute',
1961
1977
  px: '4px',
1962
- right: '4px',
1978
+ right: '0',
1963
1979
  }), children: jsxRuntime.jsx(Divider__default["default"], { className: "Mui-TableHeadCell-ResizeHandle-Divider", flexItem: true, orientation: "vertical", sx: {
1964
1980
  borderRadius: '2px',
1965
1981
  borderWidth: '2px',
@@ -2004,7 +2020,7 @@ const MRT_TableHeadCell = ({ header, table, }) => {
2004
2020
  var _a, _b, _c, _d, _f;
2005
2021
  const theme = styles.useTheme();
2006
2022
  const { getState, options: { columnFilterDisplayMode, enableColumnActions, enableColumnDragging, enableColumnOrdering, enableGrouping, enableMultiSort, layoutMode, muiTableHeadCellProps, }, refs: { tableHeadCellRefs }, setHoveredColumn, } = table;
2007
- const { density, draggingColumn, grouping, hoveredColumn, showColumnFilters, } = getState();
2023
+ const { columnSizingInfo, density, draggingColumn, grouping, hoveredColumn, showColumnFilters, } = getState();
2008
2024
  const { column } = header;
2009
2025
  const { columnDef } = column;
2010
2026
  const { columnDefType } = columnDef;
@@ -2031,18 +2047,27 @@ const MRT_TableHeadCell = ({ header, table, }) => {
2031
2047
  pl += 1.5;
2032
2048
  return pl;
2033
2049
  }, [showColumnActions, showDragHandle]);
2034
- const draggingBorder = react.useMemo(() => (draggingColumn === null || draggingColumn === void 0 ? void 0 : draggingColumn.id) === column.id
2035
- ? `1px dashed ${theme.palette.text.secondary}`
2036
- : (hoveredColumn === null || hoveredColumn === void 0 ? void 0 : hoveredColumn.id) === column.id
2037
- ? `2px dashed ${theme.palette.primary.main}`
2038
- : undefined, [draggingColumn, hoveredColumn]);
2039
- const draggingBorders = draggingBorder
2040
- ? {
2041
- borderLeft: draggingBorder,
2042
- borderRight: draggingBorder,
2043
- borderTop: draggingBorder,
2050
+ const draggingBorders = react.useMemo(() => {
2051
+ const borderStyle = columnSizingInfo.isResizingColumn === column.id &&
2052
+ !header.subHeaders.length
2053
+ ? `2px solid ${theme.palette.primary.main} !important`
2054
+ : (draggingColumn === null || draggingColumn === void 0 ? void 0 : draggingColumn.id) === column.id
2055
+ ? `1px dashed ${theme.palette.text.secondary}`
2056
+ : (hoveredColumn === null || hoveredColumn === void 0 ? void 0 : hoveredColumn.id) === column.id
2057
+ ? `2px dashed ${theme.palette.primary.main}`
2058
+ : undefined;
2059
+ if (columnSizingInfo.isResizingColumn === column.id) {
2060
+ return { borderRight: borderStyle };
2044
2061
  }
2045
- : undefined;
2062
+ const draggingBorders = borderStyle
2063
+ ? {
2064
+ borderLeft: borderStyle,
2065
+ borderRight: borderStyle,
2066
+ borderTop: borderStyle,
2067
+ }
2068
+ : undefined;
2069
+ return draggingBorders;
2070
+ }, [draggingColumn, hoveredColumn, columnSizingInfo.isResizingColumn]);
2046
2071
  const handleDragEnter = (_e) => {
2047
2072
  if (enableGrouping && (hoveredColumn === null || hoveredColumn === void 0 ? void 0 : hoveredColumn.id) === 'drop-zone') {
2048
2073
  setHoveredColumn(null);
@@ -2197,8 +2222,9 @@ const MRT_TablePagination = ({ position = 'bottom', table, }) => {
2197
2222
  return (jsxRuntime.jsxs(Box__default["default"], { sx: {
2198
2223
  alignItems: 'center',
2199
2224
  display: 'flex',
2225
+ flexWrap: 'wrap',
2200
2226
  gap: '8px',
2201
- justifyContent: 'space-between',
2227
+ justifyContent: { md: 'space-between', sm: 'center' },
2202
2228
  justifySelf: 'flex-end',
2203
2229
  mt: position === 'top' &&
2204
2230
  enableToolbarInternalActions &&
@@ -2209,12 +2235,12 @@ const MRT_TablePagination = ({ position = 'bottom', table, }) => {
2209
2235
  px: '4px',
2210
2236
  py: '12px',
2211
2237
  zIndex: 2,
2212
- }, 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"], { id: "mrt-rows-per-page", inputProps: { 'aria-label': localization.rowsPerPage }, label: localization.rowsPerPage, onChange: (event) => setPageSize(+event.target.value), sx: { '&::before': { border: 'none' }, mb: 0 }, value: pageSize, variant: "standard", children: rowsPerPageOptions.map((value) => (jsxRuntime.jsx(MenuItem__default["default"], { sx: { m: 0 }, value: value, children: value }, value))) })] })), paginationDisplayMode === 'pages' ? (jsxRuntime.jsx(Pagination__default["default"], Object.assign({ count: numberOfPages, onChange: (_e, newPageIndex) => setPageIndex(newPageIndex - 1), page: pageIndex + 1, renderItem: (item) => (jsxRuntime.jsx(PaginationItem__default["default"], Object.assign({ slots: {
2238
+ }, 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"], { disableUnderline: true, id: "mrt-rows-per-page", inputProps: { 'aria-label': localization.rowsPerPage }, label: localization.rowsPerPage, onChange: (event) => setPageSize(+event.target.value), sx: { mb: 0 }, value: pageSize, variant: "standard", children: rowsPerPageOptions.map((value) => (jsxRuntime.jsx(MenuItem__default["default"], { sx: { m: 0 }, value: value, children: value }, value))) })] })), paginationDisplayMode === 'pages' ? (jsxRuntime.jsx(Pagination__default["default"], Object.assign({ count: numberOfPages, onChange: (_e, newPageIndex) => setPageIndex(newPageIndex - 1), page: pageIndex + 1, renderItem: (item) => (jsxRuntime.jsx(PaginationItem__default["default"], Object.assign({ slots: {
2213
2239
  first: FirstPageIcon,
2214
2240
  last: LastPageIcon,
2215
2241
  next: ChevronRightIcon,
2216
2242
  previous: ChevronLeftIcon,
2217
- } }, item))), showFirstButton: showFirstButton, showLastButton: showLastButton }, rest))) : paginationDisplayMode === 'default' ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography__default["default"], { sx: { mb: 0, minWidth: '10ch', mx: '4px' }, 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(IconButton__default["default"], { "aria-label": localization.goToFirstPage, disabled: pageIndex <= 0, onClick: () => setPageIndex(0), size: "small", children: jsxRuntime.jsx(FirstPageIcon, {}) })), jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.goToPreviousPage, disabled: pageIndex <= 0, onClick: () => setPageIndex(pageIndex - 1), size: "small", children: jsxRuntime.jsx(ChevronLeftIcon, {}) }), jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.goToNextPage, disabled: lastRowIndex >= totalRowCount, onClick: () => setPageIndex(pageIndex + 1), size: "small", children: jsxRuntime.jsx(ChevronRightIcon, {}) }), showLastButton && (jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.goToLastPage, disabled: lastRowIndex >= totalRowCount, onClick: () => setPageIndex(numberOfPages - 1), size: "small", children: jsxRuntime.jsx(LastPageIcon, {}) }))] })] })) : null] }));
2243
+ } }, item))), showFirstButton: showFirstButton, showLastButton: showLastButton }, rest))) : paginationDisplayMode === 'default' ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography__default["default"], { align: "center", sx: { mb: 0, minWidth: '10ch', mx: '4px' }, 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(IconButton__default["default"], { "aria-label": localization.goToFirstPage, disabled: pageIndex <= 0, onClick: () => setPageIndex(0), size: "small", children: jsxRuntime.jsx(FirstPageIcon, {}) })), jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.goToPreviousPage, disabled: pageIndex <= 0, onClick: () => setPageIndex(pageIndex - 1), size: "small", children: jsxRuntime.jsx(ChevronLeftIcon, {}) }), jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.goToNextPage, disabled: lastRowIndex >= totalRowCount, onClick: () => setPageIndex(pageIndex + 1), size: "small", children: jsxRuntime.jsx(ChevronRightIcon, {}) }), showLastButton && (jsxRuntime.jsx(IconButton__default["default"], { "aria-label": localization.goToLastPage, disabled: lastRowIndex >= totalRowCount, onClick: () => setPageIndex(numberOfPages - 1), size: "small", children: jsxRuntime.jsx(LastPageIcon, {}) }))] })] })) : null] }));
2218
2244
  };
2219
2245
 
2220
2246
  const MRT_GlobalFilterTextField = ({ table, }) => {
@@ -2911,7 +2937,7 @@ const MRT_TablePaper = ({ table, }) => {
2911
2937
  right: 0,
2912
2938
  top: 0,
2913
2939
  width: '100vw',
2914
- zIndex: 10,
2940
+ zIndex: 9999,
2915
2941
  }
2916
2942
  : {})), tablePaperProps === null || tablePaperProps === void 0 ? void 0 : tablePaperProps.style), sx: (theme) => (Object.assign({ overflow: 'hidden', transition: 'all 100ms ease-in-out' }, parseFromValuesOrFunc(tablePaperProps === null || tablePaperProps === void 0 ? void 0 : tablePaperProps.sx, theme))), children: [enableTopToolbar &&
2917
2943
  ((_a = parseFromValuesOrFunc(renderTopToolbar, { table })) !== null && _a !== void 0 ? _a : (jsxRuntime.jsx(MRT_TopToolbar, { table: table }))), jsxRuntime.jsx(MRT_TableContainer, { table: table }), enableBottomToolbar &&