material-react-table 0.14.0 → 0.14.3
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 +20 -3
- package/dist/{buttons/MRT_ToggleColumnActionMenuButton.d.ts → head/MRT_TableHeadCellColumnActionsButton.d.ts} +1 -1
- package/dist/material-react-table.cjs.development.js +16 -7
- package/dist/material-react-table.cjs.development.js.map +1 -1
- package/dist/material-react-table.cjs.production.min.js +1 -1
- package/dist/material-react-table.cjs.production.min.js.map +1 -1
- package/dist/material-react-table.esm.js +16 -7
- package/dist/material-react-table.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/body/MRT_TableBodyCell.tsx +5 -1
- package/src/head/MRT_TableHeadCell.tsx +3 -2
- package/src/{buttons/MRT_ToggleColumnActionMenuButton.tsx → head/MRT_TableHeadCellColumnActionsButton.tsx} +1 -2
- package/src/head/MRT_TableHeadCellFilterLabel.tsx +1 -0
- package/src/head/MRT_TableHeadCellResizeHandle.tsx +1 -0
- package/src/head/MRT_TableHeadCellSortLabel.tsx +4 -0
- package/src/toolbar/MRT_ToolbarBottom.tsx +2 -0
|
@@ -1935,7 +1935,9 @@ var MRT_ToolbarBottom = function MRT_ToolbarBottom(_ref) {
|
|
|
1935
1935
|
}), {
|
|
1936
1936
|
bottom: isFullScreen ? '0' : undefined,
|
|
1937
1937
|
boxShadow: "-3px 0 6px " + alpha(theme.palette.common.black, 0.1),
|
|
1938
|
-
|
|
1938
|
+
left: 0,
|
|
1939
|
+
position: isFullScreen ? 'fixed' : 'relative',
|
|
1940
|
+
right: 0
|
|
1939
1941
|
}, toolbarProps == null ? void 0 : toolbarProps.sx);
|
|
1940
1942
|
}
|
|
1941
1943
|
}), React.createElement(MRT_LinearProgressBar, {
|
|
@@ -2300,7 +2302,8 @@ var MRT_TableHeadCellFilterLabel = function MRT_TableHeadCellFilterLabel(_ref) {
|
|
|
2300
2302
|
'&:hover': {
|
|
2301
2303
|
backgroundColor: 'transparent',
|
|
2302
2304
|
opacity: 0.8
|
|
2303
|
-
}
|
|
2305
|
+
},
|
|
2306
|
+
width: '1.5ch'
|
|
2304
2307
|
}
|
|
2305
2308
|
}, showFilters && !column.getFilterValue() ? React.createElement(FilterAltOffIcon, null) : React.createElement(FilterAltIcon, null)));
|
|
2306
2309
|
};
|
|
@@ -2329,6 +2332,7 @@ var MRT_TableHeadCellResizeHandle = function MRT_TableHeadCellResizeHandle(_ref)
|
|
|
2329
2332
|
height: showFilters && columnDefType === 'data' ? '4rem' : '2rem',
|
|
2330
2333
|
opacity: 0.8,
|
|
2331
2334
|
position: 'absolute',
|
|
2335
|
+
mr: '-1rem',
|
|
2332
2336
|
right: '1px',
|
|
2333
2337
|
touchAction: 'none',
|
|
2334
2338
|
transition: column.getIsResizing() ? undefined : 'all 0.2s ease-in-out',
|
|
@@ -2362,11 +2366,15 @@ var MRT_TableHeadCellSortLabel = function MRT_TableHeadCellSortLabel(_ref) {
|
|
|
2362
2366
|
}, React.createElement(TableSortLabel, {
|
|
2363
2367
|
"aria-label": sortTooltip,
|
|
2364
2368
|
active: !!column.getIsSorted(),
|
|
2365
|
-
direction: column.getIsSorted() ? column.getIsSorted() : undefined
|
|
2369
|
+
direction: column.getIsSorted() ? column.getIsSorted() : undefined,
|
|
2370
|
+
sx: {
|
|
2371
|
+
width: '2ch',
|
|
2372
|
+
transform: 'translateX(-0.5ch)'
|
|
2373
|
+
}
|
|
2366
2374
|
}));
|
|
2367
2375
|
};
|
|
2368
2376
|
|
|
2369
|
-
var
|
|
2377
|
+
var MRT_TableHeadCellColumnActionsButton = function MRT_TableHeadCellColumnActionsButton(_ref) {
|
|
2370
2378
|
var header = _ref.header,
|
|
2371
2379
|
instance = _ref.instance;
|
|
2372
2380
|
var _instance$options = instance.options,
|
|
@@ -2410,7 +2418,6 @@ var MRT_ToggleColumnActionMenuButton = function MRT_ToggleColumnActionMenuButton
|
|
|
2410
2418
|
}, iconButtonProps, {
|
|
2411
2419
|
sx: _extends({
|
|
2412
2420
|
height: '2rem',
|
|
2413
|
-
mr: '2px',
|
|
2414
2421
|
mt: '-0.2rem',
|
|
2415
2422
|
opacity: 0.5,
|
|
2416
2423
|
transition: 'opacity 0.2s',
|
|
@@ -2516,6 +2523,7 @@ var MRT_TableHeadCell = function MRT_TableHeadCell(_ref) {
|
|
|
2516
2523
|
display: 'flex',
|
|
2517
2524
|
justifyContent: columnDefType === 'group' ? 'center' : 'space-between',
|
|
2518
2525
|
opacity: isDragging ? 0.5 : 1,
|
|
2526
|
+
position: 'relative',
|
|
2519
2527
|
width: '100%'
|
|
2520
2528
|
}
|
|
2521
2529
|
}, React.createElement(Box, {
|
|
@@ -2542,7 +2550,7 @@ var MRT_TableHeadCell = function MRT_TableHeadCell(_ref) {
|
|
|
2542
2550
|
}, columnDefType === 'data' && (enableColumnOrdering && columnDef.enableColumnOrdering !== false || enableGrouping && columnDef.enableGrouping !== false) && React.createElement(MRT_GrabHandleButton, {
|
|
2543
2551
|
ref: dragRef,
|
|
2544
2552
|
instance: instance
|
|
2545
|
-
}), (enableColumnActions || columnDef.enableColumnActions) && columnDef.enableColumnActions !== false && columnDefType !== 'group' && React.createElement(
|
|
2553
|
+
}), (enableColumnActions || columnDef.enableColumnActions) && columnDef.enableColumnActions !== false && columnDefType !== 'group' && React.createElement(MRT_TableHeadCellColumnActionsButton, {
|
|
2546
2554
|
header: header,
|
|
2547
2555
|
instance: instance
|
|
2548
2556
|
})), column.getCanResize() && React.createElement(MRT_TableHeadCellResizeHandle, {
|
|
@@ -2816,6 +2824,7 @@ var MRT_TableBodyCell = function MRT_TableBodyCell(_ref) {
|
|
|
2816
2824
|
muiTableBodyCellProps = _instance$options.muiTableBodyCellProps,
|
|
2817
2825
|
muiTableBodyCellSkeletonProps = _instance$options.muiTableBodyCellSkeletonProps,
|
|
2818
2826
|
onCellClick = _instance$options.onCellClick,
|
|
2827
|
+
onRowClick = _instance$options.onRowClick,
|
|
2819
2828
|
rowNumberMode = _instance$options.rowNumberMode,
|
|
2820
2829
|
tableId = _instance$options.tableId,
|
|
2821
2830
|
setColumnOrder = instance.setColumnOrder,
|
|
@@ -2902,7 +2911,7 @@ var MRT_TableBodyCell = function MRT_TableBodyCell(_ref) {
|
|
|
2902
2911
|
return _extends({
|
|
2903
2912
|
backgroundColor: column.getIsPinned() ? alpha(lighten(theme.palette.background["default"], 0.04), 0.95) : undefined,
|
|
2904
2913
|
boxShadow: getIsLastLeftPinnedColumn() ? "4px 0 4px -2px " + alpha(theme.palette.common.black, 0.1) : getIsFirstRightPinnedColumn() ? "-4px 0 4px -2px " + alpha(theme.palette.common.black, 0.1) : undefined,
|
|
2905
|
-
cursor: isEditable && editingMode === 'cell' ? 'pointer' : 'text',
|
|
2914
|
+
cursor: isEditable && editingMode === 'cell' || onRowClick || onCellClick ? 'pointer' : 'text',
|
|
2906
2915
|
left: column.getIsPinned() === 'left' ? column.getStart('left') + "px" : undefined,
|
|
2907
2916
|
overflow: 'hidden',
|
|
2908
2917
|
p: density === 'compact' ? columnDefType === 'display' ? '0 0.5rem' : '0.5rem' : density === 'comfortable' ? columnDefType === 'display' ? '0.5rem 0.75rem' : '1rem' : columnDefType === 'display' ? '1rem 1.25rem' : '1.5rem',
|