material-react-table 1.2.6 → 1.2.8
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 +5 -3
- package/dist/cjs/index.js +10 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/material-react-table.esm.js +10 -5
- package/dist/esm/material-react-table.esm.js.map +1 -1
- package/package.json +6 -3
- package/src/head/MRT_TableHeadCellColumnActionsButton.tsx +1 -1
- package/src/head/MRT_TableHeadCellFilterLabel.tsx +2 -1
- package/src/head/MRT_TableHeadCellSortLabel.tsx +1 -1
- package/src/table/MRT_TableRoot.tsx +7 -8
package/README.md
CHANGED
|
@@ -33,7 +33,7 @@ Join the [Discord](https://discord.gg/5wqyRx6fnm) server to join in on the devel
|
|
|
33
33
|
|
|
34
34
|
View the [Docs Website](https://www.material-react-table.com/)
|
|
35
35
|
|
|
36
|
-
See all [Props and
|
|
36
|
+
See all [Props, Options, and APIs](https://www.material-react-table.com/docs/api)
|
|
37
37
|
|
|
38
38
|
## Quick Examples
|
|
39
39
|
|
|
@@ -94,13 +94,15 @@ _**Fully Fleshed out [Docs](https://www.material-react-table.com/docs/guides#gui
|
|
|
94
94
|
|
|
95
95
|
View the full [Installation Docs](https://www.material-react-table.com/docs/getting-started/install)
|
|
96
96
|
|
|
97
|
-
1.
|
|
97
|
+
1. Ensure that you have React 17 or later installed (MUI V5 requires React 17 or 18)
|
|
98
|
+
|
|
99
|
+
2. Install Peer Dependencies (Material UI V5)
|
|
98
100
|
|
|
99
101
|
```bash
|
|
100
102
|
npm install @mui/material @mui/icons-material @emotion/react @emotion/styled
|
|
101
103
|
```
|
|
102
104
|
|
|
103
|
-
|
|
105
|
+
3. Install material-react-table
|
|
104
106
|
|
|
105
107
|
```bash
|
|
106
108
|
npm install material-react-table
|
package/dist/cjs/index.js
CHANGED
|
@@ -1505,7 +1505,7 @@ const MRT_TableHeadCellColumnActionsButton = ({ header, table, }) => {
|
|
|
1505
1505
|
const iconButtonProps = Object.assign(Object.assign({}, mTableHeadCellColumnActionsButtonProps), mcTableHeadCellColumnActionsButtonProps);
|
|
1506
1506
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
1507
1507
|
React__default["default"].createElement(Tooltip__default["default"], { 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 },
|
|
1508
|
-
React__default["default"].createElement(IconButton__default["default"], Object.assign({ "aria-label": localization.columnActions, onClick: handleClick, size: "small" }, iconButtonProps, { sx: (theme) => (Object.assign({ height: '2rem', m: '-
|
|
1508
|
+
React__default["default"].createElement(IconButton__default["default"], Object.assign({ "aria-label": localization.columnActions, onClick: handleClick, size: "small" }, iconButtonProps, { sx: (theme) => (Object.assign({ height: '2rem', m: '-6px -3px', opacity: 0.5, transform: 'scale(0.85)', transition: 'opacity 150ms', width: '2rem', '&:hover': {
|
|
1509
1509
|
opacity: 1,
|
|
1510
1510
|
} }, ((iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx) instanceof Function
|
|
1511
1511
|
? iconButtonProps.sx(theme)
|
|
@@ -1789,11 +1789,12 @@ const MRT_TableHeadCellFilterLabel = ({ header, table }) => {
|
|
|
1789
1789
|
React__default["default"].createElement(IconButton__default["default"], { disableRipple: true, onClick: (event) => {
|
|
1790
1790
|
event.stopPropagation();
|
|
1791
1791
|
}, size: "small", sx: {
|
|
1792
|
+
height: '12px',
|
|
1792
1793
|
m: 0,
|
|
1793
1794
|
opacity: 0.8,
|
|
1794
1795
|
p: '2px',
|
|
1795
1796
|
transform: 'scale(0.66)',
|
|
1796
|
-
width: '
|
|
1797
|
+
width: '12px',
|
|
1797
1798
|
} },
|
|
1798
1799
|
React__default["default"].createElement(FilterAltIcon, null))))));
|
|
1799
1800
|
};
|
|
@@ -1882,7 +1883,7 @@ const MRT_TableHeadCellSortLabel = ({ header, table, tableCellProps, }) => {
|
|
|
1882
1883
|
? column.getIsSorted()
|
|
1883
1884
|
: undefined, sx: {
|
|
1884
1885
|
flex: '0 0',
|
|
1885
|
-
width: '
|
|
1886
|
+
width: '2.3ch',
|
|
1886
1887
|
transform: (tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.align) !== 'right'
|
|
1887
1888
|
? 'translateX(-0.5ch)'
|
|
1888
1889
|
: undefined,
|
|
@@ -2675,8 +2676,12 @@ const MRT_TableRoot = (props) => {
|
|
|
2675
2676
|
columnOrder.includes('mrt-row-drag') && Object.assign(Object.assign(Object.assign({ header: props.localization.move, size: 60 }, props.defaultDisplayColumn), (_a = props.displayColumnDefOptions) === null || _a === void 0 ? void 0 : _a['mrt-row-drag']), { id: 'mrt-row-drag' }),
|
|
2676
2677
|
columnOrder.includes('mrt-row-actions') && Object.assign(Object.assign(Object.assign({ Cell: ({ cell, row }) => (React__default["default"].createElement(MRT_ToggleRowActionMenuButton, { cell: cell, row: row, table: table })), header: props.localization.actions, size: 70 }, props.defaultDisplayColumn), (_b = props.displayColumnDefOptions) === null || _b === void 0 ? void 0 : _b['mrt-row-actions']), { id: 'mrt-row-actions' }),
|
|
2677
2678
|
columnOrder.includes('mrt-row-expand') &&
|
|
2678
|
-
showExpandColumn(props, grouping) && Object.assign(Object.assign(Object.assign({ Cell: ({ row }) => (React__default["default"].createElement(MRT_ExpandButton, { row: row, table: table })), Header:
|
|
2679
|
-
|
|
2679
|
+
showExpandColumn(props, grouping) && Object.assign(Object.assign(Object.assign({ Cell: ({ row }) => (React__default["default"].createElement(MRT_ExpandButton, { row: row, table: table })), Header: props.enableExpandAll
|
|
2680
|
+
? () => React__default["default"].createElement(MRT_ExpandAllButton, { table: table })
|
|
2681
|
+
: null, header: props.localization.expand, size: 60 }, props.defaultDisplayColumn), (_c = props.displayColumnDefOptions) === null || _c === void 0 ? void 0 : _c['mrt-row-expand']), { id: 'mrt-row-expand' }),
|
|
2682
|
+
columnOrder.includes('mrt-row-select') && Object.assign(Object.assign(Object.assign({ Cell: ({ row }) => (React__default["default"].createElement(MRT_SelectCheckbox, { row: row, table: table })), Header: props.enableSelectAll && props.enableMultiRowSelection
|
|
2683
|
+
? () => React__default["default"].createElement(MRT_SelectCheckbox, { selectAll: true, table: table })
|
|
2684
|
+
: null, header: props.localization.select, size: 60 }, props.defaultDisplayColumn), (_d = props.displayColumnDefOptions) === null || _d === void 0 ? void 0 : _d['mrt-row-select']), { id: 'mrt-row-select' }),
|
|
2680
2685
|
columnOrder.includes('mrt-row-numbers') && Object.assign(Object.assign(Object.assign({ Cell: ({ row }) => row.index + 1, Header: () => props.localization.rowNumber, header: props.localization.rowNumbers, size: 60 }, props.defaultDisplayColumn), (_e = props.displayColumnDefOptions) === null || _e === void 0 ? void 0 : _e['mrt-row-numbers']), { id: 'mrt-row-numbers' }),
|
|
2681
2686
|
].filter(Boolean);
|
|
2682
2687
|
}, [
|