material-react-table 1.1.0 → 1.1.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/dist/cjs/index.js CHANGED
@@ -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', mt: '-0.2rem', opacity: 0.5, transition: 'opacity 150ms', width: '2rem', '&:hover': {
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)
@@ -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)
@@ -1698,31 +1698,36 @@ 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.Divider, { flexItem: true, orientation: "vertical", onDoubleClick: () => column.resetSize(), sx: (theme) => ({
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
- touchAction: 'none',
1711
- transition: column.getIsResizing()
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
- }), onMouseDown: header.getResizeHandler(), onTouchStart: header.getResizeHandler(), style: {
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
- : 'none',
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'
1721
+ ? '3.5rem'
1722
+ : '1.75rem',
1723
+ opacity: 0.8,
1724
+ touchAction: 'none',
1725
+ transition: column.getIsResizing()
1726
+ ? undefined
1727
+ : 'all 150ms ease-in-out',
1728
+ userSelect: 'none',
1729
+ zIndex: 4,
1730
+ } })));
1726
1731
  };
1727
1732
 
1728
1733
  const MRT_TableHeadCellSortLabel = ({ header, table, tableCellProps, }) => {
@@ -2323,7 +2328,7 @@ const MRT_TableFooterCell = ({ footer, table }) => {
2323
2328
  ? '0.5rem'
2324
2329
  : density === 'comfortable'
2325
2330
  ? '1rem'
2326
- : '1.5rem', verticalAlign: 'top' }, getCommonCellStyles({ column, table, theme, tableCellProps }))) }),
2331
+ : '1.5rem', verticalAlign: 'top', zIndex: column.getIsPinned() && columnDefType !== 'group' ? 2 : 1 }, getCommonCellStyles({ column, table, theme, tableCellProps }))) }),
2327
2332
  React__default["default"].createElement(React__default["default"].Fragment, null, footer.isPlaceholder
2328
2333
  ? null
2329
2334
  : (_c = (_b = (columnDef.Footer instanceof Function