material-react-table 1.1.0 → 1.2.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 +1 -0
- package/dist/cjs/index.js +76 -54
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/MaterialReactTable.d.ts +1 -0
- package/dist/esm/material-react-table.esm.js +76 -54
- package/dist/esm/material-react-table.esm.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/MaterialReactTable.tsx +1 -0
- package/src/buttons/MRT_GrabHandleButton.tsx +1 -1
- package/src/footer/MRT_TableFooterCell.tsx +1 -0
- package/src/head/MRT_TableHeadCell.tsx +75 -44
- package/src/head/MRT_TableHeadCellColumnActionsButton.tsx +1 -1
- package/src/head/MRT_TableHeadCellFilterLabel.tsx +3 -3
- package/src/head/MRT_TableHeadCellResizeHandle.tsx +26 -20
- package/src/head/MRT_TableHeadCellSortLabel.tsx +1 -0
- package/src/inputs/MRT_FilterTextField.tsx +4 -2
- package/src/inputs/MRT_GlobalFilterTextField.tsx +7 -3
- package/src/table/MRT_TableRoot.tsx +2 -0
|
@@ -132,6 +132,7 @@ export declare type MRT_TableInstance<TData extends Record<string, any> = {}> =
|
|
|
132
132
|
filterInputRefs: MutableRefObject<Record<string, HTMLInputElement>>;
|
|
133
133
|
searchInputRef: MutableRefObject<HTMLInputElement>;
|
|
134
134
|
tableContainerRef: MutableRefObject<HTMLDivElement>;
|
|
135
|
+
tableHeadCellRefs: MutableRefObject<Record<string, HTMLTableCellElement>>;
|
|
135
136
|
tablePaperRef: MutableRefObject<HTMLDivElement>;
|
|
136
137
|
topToolbarRef: MutableRefObject<HTMLDivElement>;
|
|
137
138
|
};
|
package/dist/cjs/index.js
CHANGED
|
@@ -564,7 +564,7 @@ const MRT_GrabHandleButton = ({ iconButtonProps, onDragEnd, onDragStart, table,
|
|
|
564
564
|
var _a;
|
|
565
565
|
e.stopPropagation();
|
|
566
566
|
(_a = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.onClick) === null || _a === void 0 ? void 0 : _a.call(iconButtonProps, e);
|
|
567
|
-
}, onDragStart: onDragStart, onDragEnd: onDragEnd, sx: (theme) => (Object.assign({ cursor: 'grab', m: 0, opacity: 0.5, p: '2px', transition: 'all 150ms ease-in-out', '&:hover': {
|
|
567
|
+
}, onDragStart: onDragStart, onDragEnd: onDragEnd, sx: (theme) => (Object.assign({ cursor: 'grab', m: '0 -0.1rem', opacity: 0.5, p: '2px', transition: 'all 150ms ease-in-out', '&:hover': {
|
|
568
568
|
backgroundColor: 'transparent',
|
|
569
569
|
opacity: 1,
|
|
570
570
|
}, '&:active': {
|
|
@@ -996,7 +996,7 @@ const MRT_SelectCheckbox = ({ row, selectAll, table }) => {
|
|
|
996
996
|
|
|
997
997
|
const MRT_GlobalFilterTextField = ({ table, }) => {
|
|
998
998
|
var _a;
|
|
999
|
-
const { getState, setGlobalFilter, options: { enableGlobalFilterModes, icons: { SearchIcon, CloseIcon }, localization, muiSearchTextFieldProps, }, refs: { searchInputRef }, } = table;
|
|
999
|
+
const { getState, setGlobalFilter, options: { enableGlobalFilterModes, icons: { SearchIcon, CloseIcon }, localization, manualFiltering, muiSearchTextFieldProps, }, refs: { searchInputRef }, } = table;
|
|
1000
1000
|
const { globalFilter, showGlobalFilter } = getState();
|
|
1001
1001
|
const textFieldProps = muiSearchTextFieldProps instanceof Function
|
|
1002
1002
|
? muiSearchTextFieldProps({ table })
|
|
@@ -1006,7 +1006,7 @@ const MRT_GlobalFilterTextField = ({ table, }) => {
|
|
|
1006
1006
|
const handleChangeDebounced = React.useCallback(material.debounce((event) => {
|
|
1007
1007
|
var _a;
|
|
1008
1008
|
setGlobalFilter((_a = event.target.value) !== null && _a !== void 0 ? _a : undefined);
|
|
1009
|
-
}, 250), []);
|
|
1009
|
+
}, manualFiltering ? 500 : 250), []);
|
|
1010
1010
|
const handleChange = (event) => {
|
|
1011
1011
|
setSearchValue(event.target.value);
|
|
1012
1012
|
handleChangeDebounced(event);
|
|
@@ -1364,7 +1364,7 @@ const MRT_TableHeadCellColumnActionsButton = ({ header, table, }) => {
|
|
|
1364
1364
|
const iconButtonProps = Object.assign(Object.assign({}, mTableHeadCellColumnActionsButtonProps), mcTableHeadCellColumnActionsButtonProps);
|
|
1365
1365
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
1366
1366
|
React__default["default"].createElement(material.Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, placement: "top", title: (_a = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.title) !== null && _a !== void 0 ? _a : localization.columnActions },
|
|
1367
|
-
React__default["default"].createElement(material.IconButton, Object.assign({ "aria-label": localization.columnActions, onClick: handleClick, size: "small" }, iconButtonProps, { sx: (theme) => (Object.assign({ height: '2rem',
|
|
1367
|
+
React__default["default"].createElement(material.IconButton, Object.assign({ "aria-label": localization.columnActions, onClick: handleClick, size: "small" }, iconButtonProps, { sx: (theme) => (Object.assign({ height: '2rem', m: '-0.2rem', opacity: 0.5, transition: 'opacity 150ms', width: '2rem', '&:hover': {
|
|
1368
1368
|
opacity: 1,
|
|
1369
1369
|
} }, ((iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx) instanceof Function
|
|
1370
1370
|
? iconButtonProps.sx(theme)
|
|
@@ -1375,7 +1375,7 @@ const MRT_TableHeadCellColumnActionsButton = ({ header, table, }) => {
|
|
|
1375
1375
|
|
|
1376
1376
|
const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
|
|
1377
1377
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
1378
|
-
const { options: { enableColumnFilterModes, columnFilterModeOptions, icons: { FilterListIcon, CloseIcon }, localization, muiTableHeadCellFilterTextFieldProps, }, refs: { filterInputRefs }, setColumnFilterFns, } = table;
|
|
1378
|
+
const { options: { enableColumnFilterModes, columnFilterModeOptions, icons: { FilterListIcon, CloseIcon }, localization, manualFiltering, muiTableHeadCellFilterTextFieldProps, }, refs: { filterInputRefs }, setColumnFilterFns, } = table;
|
|
1379
1379
|
const { column } = header;
|
|
1380
1380
|
const { columnDef } = column;
|
|
1381
1381
|
const mTableHeadCellFilterTextFieldProps = muiTableHeadCellFilterTextFieldProps instanceof Function
|
|
@@ -1442,7 +1442,7 @@ const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
|
|
|
1442
1442
|
else {
|
|
1443
1443
|
column.setFilterValue(value !== null && value !== void 0 ? value : undefined);
|
|
1444
1444
|
}
|
|
1445
|
-
}, isTextboxFilter ? 200 : 1), []);
|
|
1445
|
+
}, isTextboxFilter ? (manualFiltering ? 400 : 200) : 1), []);
|
|
1446
1446
|
const handleChange = (event) => {
|
|
1447
1447
|
setFilterValue(event.target.value);
|
|
1448
1448
|
handleChangeDebounced(event);
|
|
@@ -1539,7 +1539,7 @@ const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
|
|
|
1539
1539
|
? '100px'
|
|
1540
1540
|
: !filterChipLabel
|
|
1541
1541
|
? '120px'
|
|
1542
|
-
: 'auto', width: '100%', '& .MuiSelect-icon': {
|
|
1542
|
+
: 'auto', width: 'calc(100% + 4px)', mx: '-2px', '& .MuiSelect-icon': {
|
|
1543
1543
|
mr: '1.5rem',
|
|
1544
1544
|
} }, ((textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.sx) instanceof Function
|
|
1545
1545
|
? textFieldProps.sx(theme)
|
|
@@ -1643,7 +1643,7 @@ const MRT_TableHeadCellFilterLabel = ({ header, table }) => {
|
|
|
1643
1643
|
return (React__default["default"].createElement(material.Grow, { unmountOnExit: true, in: (!!column.getFilterValue() && !isRangeFilter) ||
|
|
1644
1644
|
(isRangeFilter && // @ts-ignore
|
|
1645
1645
|
(!!((_b = column.getFilterValue()) === null || _b === void 0 ? void 0 : _b[0]) || !!((_c = column.getFilterValue()) === null || _c === void 0 ? void 0 : _c[1]))) },
|
|
1646
|
-
React__default["default"].createElement("span",
|
|
1646
|
+
React__default["default"].createElement(material.Box, { component: "span", sx: { flex: '0 0' } },
|
|
1647
1647
|
React__default["default"].createElement(material.Tooltip, { arrow: true, placement: "top", title: filterTooltip },
|
|
1648
1648
|
React__default["default"].createElement(material.IconButton, { disableRipple: true, onClick: (event) => {
|
|
1649
1649
|
event.stopPropagation();
|
|
@@ -1698,31 +1698,33 @@ const MRT_TableHeadCellResizeHandle = ({ header, table }) => {
|
|
|
1698
1698
|
const { column } = header;
|
|
1699
1699
|
const { columnDef } = column;
|
|
1700
1700
|
const { columnDefType } = columnDef;
|
|
1701
|
-
return (React__default["default"].createElement(material.
|
|
1702
|
-
borderRadius: '2px',
|
|
1703
|
-
borderRightWidth: '2px',
|
|
1701
|
+
return (React__default["default"].createElement(material.Box, { onDoubleClick: () => column.resetSize(), onMouseDown: header.getResizeHandler(), onTouchStart: header.getResizeHandler(), sx: (theme) => ({
|
|
1704
1702
|
cursor: 'col-resize',
|
|
1705
|
-
height: showColumnFilters && columnDefType === 'data' ? '4rem' : '2rem',
|
|
1706
1703
|
mr: density === 'compact' ? '-0.5rem' : '-1rem',
|
|
1707
|
-
opacity: 0.8,
|
|
1708
1704
|
position: 'absolute',
|
|
1709
1705
|
right: '1px',
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
? undefined
|
|
1713
|
-
: 'all 150ms ease-in-out',
|
|
1714
|
-
userSelect: 'none',
|
|
1715
|
-
zIndex: 4,
|
|
1716
|
-
'&:active': {
|
|
1706
|
+
px: '4px',
|
|
1707
|
+
'&:active > hr': {
|
|
1717
1708
|
backgroundColor: theme.palette.info.main,
|
|
1718
1709
|
opacity: 1,
|
|
1719
1710
|
},
|
|
1720
|
-
}),
|
|
1711
|
+
}), style: {
|
|
1721
1712
|
transform: column.getIsResizing()
|
|
1722
1713
|
? `translateX(${((_a = getState().columnSizingInfo.deltaOffset) !== null && _a !== void 0 ? _a : 0) /
|
|
1723
1714
|
(columnResizeMode === 'onChange' ? 16 : 1)}px)`
|
|
1724
|
-
:
|
|
1725
|
-
} }
|
|
1715
|
+
: undefined,
|
|
1716
|
+
} },
|
|
1717
|
+
React__default["default"].createElement(material.Divider, { flexItem: true, orientation: "vertical", sx: {
|
|
1718
|
+
borderRadius: '2px',
|
|
1719
|
+
borderWidth: '2px',
|
|
1720
|
+
height: showColumnFilters && columnDefType === 'data' ? '3.5rem' : '1.5rem',
|
|
1721
|
+
touchAction: 'none',
|
|
1722
|
+
transition: column.getIsResizing()
|
|
1723
|
+
? undefined
|
|
1724
|
+
: 'all 150ms ease-in-out',
|
|
1725
|
+
userSelect: 'none',
|
|
1726
|
+
zIndex: 4,
|
|
1727
|
+
} })));
|
|
1726
1728
|
};
|
|
1727
1729
|
|
|
1728
1730
|
const MRT_TableHeadCellSortLabel = ({ header, table, tableCellProps, }) => {
|
|
@@ -1738,6 +1740,7 @@ const MRT_TableHeadCellSortLabel = ({ header, table, tableCellProps, }) => {
|
|
|
1738
1740
|
React__default["default"].createElement(material.TableSortLabel, { "aria-label": sortTooltip, active: !!column.getIsSorted(), direction: column.getIsSorted()
|
|
1739
1741
|
? column.getIsSorted()
|
|
1740
1742
|
: undefined, sx: {
|
|
1743
|
+
flex: '0 0',
|
|
1741
1744
|
width: '2ch',
|
|
1742
1745
|
transform: (tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.align) !== 'right'
|
|
1743
1746
|
? 'translateX(-0.5ch)'
|
|
@@ -1748,7 +1751,7 @@ const MRT_TableHeadCellSortLabel = ({ header, table, tableCellProps, }) => {
|
|
|
1748
1751
|
const MRT_TableHeadCell = ({ header, table }) => {
|
|
1749
1752
|
var _a, _b, _c, _d;
|
|
1750
1753
|
const theme = material.useTheme();
|
|
1751
|
-
const { getState, options: { enableColumnActions, enableColumnDragging, enableColumnOrdering, enableGrouping, enableMultiSort, muiTableHeadCellProps, }, setHoveredColumn, } = table;
|
|
1754
|
+
const { getState, options: { enableColumnActions, enableColumnDragging, enableColumnOrdering, enableGrouping, enableMultiSort, muiTableHeadCellProps, }, refs: { tableHeadCellRefs }, setHoveredColumn, } = table;
|
|
1752
1755
|
const { density, draggingColumn, grouping, hoveredColumn, showColumnFilters, } = getState();
|
|
1753
1756
|
const { column } = header;
|
|
1754
1757
|
const { columnDef } = column;
|
|
@@ -1760,6 +1763,25 @@ const MRT_TableHeadCell = ({ header, table }) => {
|
|
|
1760
1763
|
? columnDef.muiTableHeadCellProps({ column, table })
|
|
1761
1764
|
: columnDef.muiTableHeadCellProps;
|
|
1762
1765
|
const tableCellProps = Object.assign(Object.assign({}, mTableHeadCellProps), mcTableHeadCellProps);
|
|
1766
|
+
const showColumnActions = (enableColumnActions || columnDef.enableColumnActions) &&
|
|
1767
|
+
columnDef.enableColumnActions !== false;
|
|
1768
|
+
const showDragHandle = enableColumnDragging !== false &&
|
|
1769
|
+
columnDef.enableColumnDragging !== false &&
|
|
1770
|
+
(enableColumnDragging ||
|
|
1771
|
+
(enableColumnOrdering && columnDef.enableColumnOrdering !== false) ||
|
|
1772
|
+
(enableGrouping &&
|
|
1773
|
+
columnDef.enableGrouping !== false &&
|
|
1774
|
+
!grouping.includes(column.id)));
|
|
1775
|
+
const headerPL = React.useMemo(() => {
|
|
1776
|
+
let pl = 0;
|
|
1777
|
+
if (column.getCanSort())
|
|
1778
|
+
pl++;
|
|
1779
|
+
if (showColumnActions)
|
|
1780
|
+
pl += 1.75;
|
|
1781
|
+
if (showDragHandle)
|
|
1782
|
+
pl += 1.25;
|
|
1783
|
+
return pl;
|
|
1784
|
+
}, [showColumnActions, showDragHandle]);
|
|
1763
1785
|
const draggingBorder = React.useMemo(() => (draggingColumn === null || draggingColumn === void 0 ? void 0 : draggingColumn.id) === column.id
|
|
1764
1786
|
? `1px dashed ${theme.palette.text.secondary}`
|
|
1765
1787
|
: (hoveredColumn === null || hoveredColumn === void 0 ? void 0 : hoveredColumn.id) === column.id
|
|
@@ -1780,15 +1802,18 @@ const MRT_TableHeadCell = ({ header, table }) => {
|
|
|
1780
1802
|
setHoveredColumn(columnDef.enableColumnOrdering !== false ? column : null);
|
|
1781
1803
|
}
|
|
1782
1804
|
};
|
|
1783
|
-
const headerElement = (
|
|
1805
|
+
const headerElement = (columnDef === null || columnDef === void 0 ? void 0 : columnDef.Header) instanceof Function
|
|
1784
1806
|
? (_a = columnDef === null || columnDef === void 0 ? void 0 : columnDef.Header) === null || _a === void 0 ? void 0 : _a.call(columnDef, {
|
|
1785
1807
|
column,
|
|
1786
1808
|
header,
|
|
1787
1809
|
table,
|
|
1788
1810
|
})
|
|
1789
|
-
: columnDef === null || columnDef === void 0 ? void 0 : columnDef.Header)
|
|
1790
|
-
|
|
1791
|
-
|
|
1811
|
+
: (_b = columnDef === null || columnDef === void 0 ? void 0 : columnDef.Header) !== null && _b !== void 0 ? _b : columnDef.header;
|
|
1812
|
+
return (React__default["default"].createElement(material.TableCell, Object.assign({ align: columnDefType === 'group' ? 'center' : 'left', colSpan: header.colSpan, onDragEnter: handleDragEnter, ref: (node) => {
|
|
1813
|
+
if (node) {
|
|
1814
|
+
tableHeadCellRefs.current[column.id] = node;
|
|
1815
|
+
}
|
|
1816
|
+
} }, tableCellProps, { sx: (theme) => (Object.assign(Object.assign({ fontWeight: 'bold', overflow: 'visible', p: density === 'compact'
|
|
1792
1817
|
? '0.5rem'
|
|
1793
1818
|
: density === 'comfortable'
|
|
1794
1819
|
? columnDefType === 'display'
|
|
@@ -1815,47 +1840,42 @@ const MRT_TableHeadCell = ({ header, table }) => {
|
|
|
1815
1840
|
tableCellProps,
|
|
1816
1841
|
theme,
|
|
1817
1842
|
})), draggingBorders)) }),
|
|
1818
|
-
header.isPlaceholder ? null : (React__default["default"].createElement(material.Box, { sx: {
|
|
1843
|
+
header.isPlaceholder ? null : (React__default["default"].createElement(material.Box, { className: "Mui-TableHeadCell-Content", sx: {
|
|
1819
1844
|
alignItems: 'flex-start',
|
|
1820
1845
|
display: 'flex',
|
|
1821
1846
|
flexDirection: (tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.align) === 'right' ? 'row-reverse' : 'row',
|
|
1822
|
-
justifyContent: (tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.align) === '
|
|
1823
|
-
? '
|
|
1824
|
-
:
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
: 'space-between',
|
|
1847
|
+
justifyContent: columnDefType === 'group' || (tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.align) === 'center'
|
|
1848
|
+
? 'center'
|
|
1849
|
+
: column.getCanResize()
|
|
1850
|
+
? 'space-between'
|
|
1851
|
+
: 'flex-start',
|
|
1828
1852
|
position: 'relative',
|
|
1829
1853
|
width: '100%',
|
|
1830
1854
|
} },
|
|
1831
|
-
React__default["default"].createElement(material.Box, { onClick: column.getToggleSortingHandler(), sx: {
|
|
1855
|
+
React__default["default"].createElement(material.Box, { className: "Mui-TableHeadCell-Content-Labels", onClick: column.getToggleSortingHandler(), sx: {
|
|
1832
1856
|
alignItems: 'center',
|
|
1833
1857
|
cursor: column.getCanSort() && columnDefType !== 'group'
|
|
1834
1858
|
? 'pointer'
|
|
1835
1859
|
: undefined,
|
|
1836
1860
|
display: 'flex',
|
|
1837
1861
|
flexDirection: (tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.align) === 'right' ? 'row-reverse' : 'row',
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
? '1rem'
|
|
1862
|
+
overflow: 'hidden',
|
|
1863
|
+
pl: (tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.align) === 'center'
|
|
1864
|
+
? `${headerPL}rem`
|
|
1842
1865
|
: undefined,
|
|
1843
|
-
whiteSpace: ((_d = (_c = columnDef.header) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0) < 24 ? 'nowrap' : 'normal',
|
|
1844
1866
|
} },
|
|
1845
|
-
|
|
1867
|
+
React__default["default"].createElement(material.Box, { className: "Mui-TableHeadCell-Content-Wrapper", sx: {
|
|
1868
|
+
overflow: 'hidden',
|
|
1869
|
+
textOverflow: 'ellipsis',
|
|
1870
|
+
whiteSpace: ((_d = (_c = columnDef.header) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0) < 20 ? 'nowrap' : 'normal',
|
|
1871
|
+
}, title: columnDef.header }, headerElement),
|
|
1846
1872
|
column.getCanSort() && (React__default["default"].createElement(MRT_TableHeadCellSortLabel, { header: header, table: table, tableCellProps: tableCellProps })),
|
|
1847
1873
|
column.getCanFilter() && (React__default["default"].createElement(MRT_TableHeadCellFilterLabel, { header: header, table: table }))),
|
|
1848
|
-
columnDefType !== 'group' && (React__default["default"].createElement(material.Box, { sx: { whiteSpace: 'nowrap' } },
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
columnDef.enableColumnOrdering !== false) ||
|
|
1854
|
-
(enableGrouping &&
|
|
1855
|
-
columnDef.enableGrouping !== false &&
|
|
1856
|
-
!grouping.includes(column.id))) && (React__default["default"].createElement(MRT_TableHeadCellGrabHandle, { column: column, table: table, tableHeadCellRef: tableHeadCellRef })),
|
|
1857
|
-
(enableColumnActions || columnDef.enableColumnActions) &&
|
|
1858
|
-
columnDef.enableColumnActions !== false && (React__default["default"].createElement(MRT_TableHeadCellColumnActionsButton, { header: header, table: table })))),
|
|
1874
|
+
columnDefType !== 'group' && (React__default["default"].createElement(material.Box, { className: "Mui-TableHeadCell-Content-Actions", sx: { whiteSpace: 'nowrap' } },
|
|
1875
|
+
showDragHandle && (React__default["default"].createElement(MRT_TableHeadCellGrabHandle, { column: column, table: table, tableHeadCellRef: {
|
|
1876
|
+
current: tableHeadCellRefs.current[column.id],
|
|
1877
|
+
} })),
|
|
1878
|
+
showColumnActions && (React__default["default"].createElement(MRT_TableHeadCellColumnActionsButton, { header: header, table: table })))),
|
|
1859
1879
|
column.getCanResize() && (React__default["default"].createElement(MRT_TableHeadCellResizeHandle, { header: header, table: table })))),
|
|
1860
1880
|
column.getCanFilter() && (React__default["default"].createElement(MRT_TableHeadCellFilterContainer, { header: header, table: table }))));
|
|
1861
1881
|
};
|
|
@@ -2323,7 +2343,7 @@ const MRT_TableFooterCell = ({ footer, table }) => {
|
|
|
2323
2343
|
? '0.5rem'
|
|
2324
2344
|
: density === 'comfortable'
|
|
2325
2345
|
? '1rem'
|
|
2326
|
-
: '1.5rem', verticalAlign: 'top' }, getCommonCellStyles({ column, table, theme, tableCellProps }))) }),
|
|
2346
|
+
: '1.5rem', verticalAlign: 'top', zIndex: column.getIsPinned() && columnDefType !== 'group' ? 2 : 1 }, getCommonCellStyles({ column, table, theme, tableCellProps }))) }),
|
|
2327
2347
|
React__default["default"].createElement(React__default["default"].Fragment, null, footer.isPlaceholder
|
|
2328
2348
|
? null
|
|
2329
2349
|
: (_c = (_b = (columnDef.Footer instanceof Function
|
|
@@ -2474,6 +2494,7 @@ const MRT_TableRoot = (props) => {
|
|
|
2474
2494
|
const filterInputRefs = React.useRef({});
|
|
2475
2495
|
const searchInputRef = React.useRef(null);
|
|
2476
2496
|
const tableContainerRef = React.useRef(null);
|
|
2497
|
+
const tableHeadCellRefs = React.useRef({});
|
|
2477
2498
|
const tablePaperRef = React.useRef(null);
|
|
2478
2499
|
const topToolbarRef = React.useRef(null);
|
|
2479
2500
|
const initialState = React.useMemo(() => {
|
|
@@ -2595,6 +2616,7 @@ const MRT_TableRoot = (props) => {
|
|
|
2595
2616
|
filterInputRefs,
|
|
2596
2617
|
searchInputRef,
|
|
2597
2618
|
tableContainerRef,
|
|
2619
|
+
tableHeadCellRefs,
|
|
2598
2620
|
tablePaperRef,
|
|
2599
2621
|
topToolbarRef,
|
|
2600
2622
|
}, setColumnFilterFns: (_x = props.onFilterFnsChange) !== null && _x !== void 0 ? _x : setColumnFilterFns, setDensity: (_y = props.onDensityChange) !== null && _y !== void 0 ? _y : setDensity, setDraggingColumn: (_z = props.onDraggingColumnChange) !== null && _z !== void 0 ? _z : setDraggingColumn, setDraggingRow: (_0 = props.onDraggingRowChange) !== null && _0 !== void 0 ? _0 : setDraggingRow, setEditingCell: (_1 = props.onEditingCellChange) !== null && _1 !== void 0 ? _1 : setEditingCell, setEditingRow: (_2 = props.onEditingRowChange) !== null && _2 !== void 0 ? _2 : setEditingRow, setGlobalFilterFn: (_3 = props.onGlobalFilterFnChange) !== null && _3 !== void 0 ? _3 : setGlobalFilterFn, setHoveredColumn: (_4 = props.onHoveredColumnChange) !== null && _4 !== void 0 ? _4 : setHoveredColumn, setHoveredRow: (_5 = props.onHoveredRowChange) !== null && _5 !== void 0 ? _5 : setHoveredRow, setIsFullScreen: (_6 = props.onIsFullScreenChange) !== null && _6 !== void 0 ? _6 : setIsFullScreen, setShowAlertBanner: (_7 = props.onShowAlertBannerChange) !== null && _7 !== void 0 ? _7 : setShowAlertBanner, setShowFilters: (_8 = props.onShowFiltersChange) !== null && _8 !== void 0 ? _8 : setShowFilters, setShowGlobalFilter: (_9 = props.onShowGlobalFilterChange) !== null && _9 !== void 0 ? _9 : setShowGlobalFilter });
|