material-react-table-narender 2.13.30 → 2.13.33
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/index.esm.js +6 -21
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +5 -20
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/head/MRT_TableHeadCell.tsx +1 -1
- package/src/components/head/MRT_TableHeadCellToolBar.tsx +61 -61
- package/src/components/menus/MRT_ColumnActionMenu.tsx +3 -2
- package/src/components/menus/MRT_ShowHideColumnsMenuItems.tsx +2 -2
- package/src/components/table/MRT_TablePaper.tsx +5 -2
- package/src/components/toolbar/MRT_ToolbarInternalButtons.tsx +2 -2
package/package.json
CHANGED
@@ -18,7 +18,7 @@ import {
|
|
18
18
|
import { getCommonMRTCellStyles } from '../../utils/style.utils';
|
19
19
|
import { parseFromValuesOrFunc } from '../../utils/utils';
|
20
20
|
import { cellKeyboardShortcuts } from '../../utils/cell.utils';
|
21
|
-
import { MRT_TableHeadCellToolBar } from './MRT_TableHeadCellToolBar';
|
21
|
+
// import { MRT_TableHeadCellToolBar } from './MRT_TableHeadCellToolBar';
|
22
22
|
|
23
23
|
export interface MRT_TableHeadCellProps<TData extends MRT_RowData>
|
24
24
|
extends TableCellProps {
|
@@ -1,68 +1,68 @@
|
|
1
|
-
import Badge from '@mui/material/Badge';
|
2
|
-
import TableSortLabel, {
|
3
|
-
|
4
|
-
} from '@mui/material/TableSortLabel';
|
5
|
-
import Tooltip from '@mui/material/Tooltip';
|
6
|
-
import {
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
} from '../../types';
|
11
|
-
import { parseFromValuesOrFunc } from '../../utils/utils';
|
12
|
-
import { IconButton } from '@mui/material';
|
1
|
+
// import Badge from '@mui/material/Badge';
|
2
|
+
// import TableSortLabel, {
|
3
|
+
// type TableSortLabelProps,
|
4
|
+
// } from '@mui/material/TableSortLabel';
|
5
|
+
// import Tooltip from '@mui/material/Tooltip';
|
6
|
+
// import {
|
7
|
+
// type MRT_Header,
|
8
|
+
// type MRT_RowData,
|
9
|
+
// type MRT_TableInstance,
|
10
|
+
// } from '../../types';
|
11
|
+
// import { parseFromValuesOrFunc } from '../../utils/utils';
|
12
|
+
// import { IconButton } from '@mui/material';
|
13
13
|
|
14
|
-
export interface MRT_TableHeadCellToolBarLabelProps<TData extends MRT_RowData>
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
}
|
14
|
+
// export interface MRT_TableHeadCellToolBarLabelProps<TData extends MRT_RowData>
|
15
|
+
// extends TableSortLabelProps {
|
16
|
+
// header: MRT_Header<TData>;
|
17
|
+
// table: MRT_TableInstance<TData>;
|
18
|
+
// }
|
19
19
|
|
20
|
-
export const MRT_TableHeadCellToolBar = <TData extends MRT_RowData>({
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
}: MRT_TableHeadCellToolBarLabelProps<TData>) => {
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
20
|
+
// export const MRT_TableHeadCellToolBar = <TData extends MRT_RowData>({
|
21
|
+
// header,
|
22
|
+
// table,
|
23
|
+
// ...rest
|
24
|
+
// }: MRT_TableHeadCellToolBarLabelProps<TData>) => {
|
25
|
+
// const {
|
26
|
+
// getState,
|
27
|
+
// options: {
|
28
|
+
// icons: { ArrowDownwardIcon, SyncAltIcon },
|
29
|
+
// localization,
|
30
|
+
// },
|
31
|
+
// } = table;
|
32
|
+
// const { isLoading, showSkeletons, showToolBar } = getState();
|
33
33
|
|
34
34
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
35
|
+
// const showToolBarTooltip = isLoading || showSkeletons
|
36
|
+
// ? ''
|
37
|
+
// : showToolBar
|
38
|
+
// ? "Hide ToolBar"
|
39
|
+
// : "Show ToolBar";
|
40
40
|
|
41
41
|
|
42
|
-
|
43
|
-
|
42
|
+
// return (
|
43
|
+
// <Tooltip placement="top" title={showToolBarTooltip}>
|
44
44
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
};
|
45
|
+
// <IconButton
|
46
|
+
// aria-label={showToolBarTooltip}
|
47
|
+
// size="small"
|
48
|
+
// sx={(theme) => ({
|
49
|
+
// '&:hover': {
|
50
|
+
// backgroundColor: 'transparent',
|
51
|
+
// opacity: 1,
|
52
|
+
// },
|
53
|
+
// cursor: 'pointer',
|
54
|
+
// opacity: 1,
|
55
|
+
// p: '2px',
|
56
|
+
// transition: 'all 150ms ease-in-out',
|
57
|
+
// ...(parseFromValuesOrFunc(rest?.sx, theme) as any),
|
58
|
+
// })}
|
59
|
+
// onClick={(e) => {
|
60
|
+
// e.stopPropagation();
|
61
|
+
// table.setShowToolBar(!showToolBar);
|
62
|
+
// }}
|
63
|
+
// >
|
64
|
+
// <SyncAltIcon />
|
65
|
+
// </IconButton>
|
66
|
+
// </Tooltip>
|
67
|
+
// );
|
68
|
+
// };
|
@@ -7,7 +7,7 @@ import {
|
|
7
7
|
type MRT_RowData,
|
8
8
|
type MRT_TableInstance,
|
9
9
|
} from '../../types';
|
10
|
-
import { MRT_TableHeadCellToolBar } from '../head/MRT_TableHeadCellToolBar';
|
10
|
+
// import { MRT_TableHeadCellToolBar } from '../head/MRT_TableHeadCellToolBar';
|
11
11
|
|
12
12
|
export interface MRT_ColumnActionMenuProps<TData extends MRT_RowData>
|
13
13
|
extends Partial<MenuProps> {
|
@@ -322,10 +322,11 @@ export const MRT_ColumnActionMenu = <TData extends MRT_RowData>({
|
|
322
322
|
<MRT_ActionMenuItem
|
323
323
|
icon={<SettingsOutlinedIcon />}
|
324
324
|
key={13}
|
325
|
-
label={showToolBar ? "Hide
|
325
|
+
label={showToolBar ? "Hide Toolbar" : "Show Toolbar"}
|
326
326
|
onClick={(e) => {
|
327
327
|
e.stopPropagation();
|
328
328
|
table.setShowToolBar(!showToolBar);
|
329
|
+
setAnchorEl(null);
|
329
330
|
}}
|
330
331
|
table={table}
|
331
332
|
/>,
|
@@ -180,7 +180,7 @@ export const MRT_ShowHideColumnsMenuItems = <TData extends MRT_RowData>({
|
|
180
180
|
{columnDef.header}
|
181
181
|
</Typography>
|
182
182
|
)}
|
183
|
-
{
|
183
|
+
{/* {
|
184
184
|
enableColumnResizing && columnDefType !== 'group' &&
|
185
185
|
(
|
186
186
|
columnDef.enableResizing !== false ? (
|
@@ -202,7 +202,7 @@ export const MRT_ShowHideColumnsMenuItems = <TData extends MRT_RowData>({
|
|
202
202
|
<Box sx={{ width: '28px' }} />
|
203
203
|
)
|
204
204
|
)
|
205
|
-
}
|
205
|
+
} */}
|
206
206
|
|
207
207
|
</Box>
|
208
208
|
</MenuItem>
|
@@ -27,7 +27,7 @@ export const MRT_TablePaper = <TData extends MRT_RowData>({
|
|
27
27
|
},
|
28
28
|
refs: { tablePaperRef },
|
29
29
|
} = table;
|
30
|
-
const { isFullScreen } = getState();
|
30
|
+
const { isFullScreen,showToolBar } = getState();
|
31
31
|
|
32
32
|
const paperProps = {
|
33
33
|
...parseFromValuesOrFunc(muiTablePaperProps, { table }),
|
@@ -74,10 +74,13 @@ export const MRT_TablePaper = <TData extends MRT_RowData>({
|
|
74
74
|
...(parseFromValuesOrFunc(paperProps?.sx, theme) as any),
|
75
75
|
})}
|
76
76
|
>
|
77
|
-
{enableTopToolbar &&
|
77
|
+
{enableTopToolbar &&
|
78
78
|
(parseFromValuesOrFunc(renderTopToolbar, { table }) ?? (
|
79
79
|
<MRT_TopToolbar table={table} />
|
80
80
|
))}
|
81
|
+
|
82
|
+
|
83
|
+
|
81
84
|
<MRT_TableContainer table={table} />
|
82
85
|
{enableBottomToolbar &&
|
83
86
|
(parseFromValuesOrFunc(renderBottomToolbar, { table }) ?? (
|
@@ -67,9 +67,9 @@ export const MRT_ToolbarInternalButtons = <TData extends MRT_RowData>({
|
|
67
67
|
{enableFullScreenToggle && (
|
68
68
|
<MRT_ToggleFullScreenButton table={table} />
|
69
69
|
)}
|
70
|
-
{enableKeyboardShortcuts && (
|
70
|
+
{/* {enableKeyboardShortcuts && (
|
71
71
|
<MRT_ToggleNavigationButton table={table} />
|
72
|
-
)}
|
72
|
+
)} */}
|
73
73
|
</>
|
74
74
|
)}
|
75
75
|
</Box>
|