@bento-core/table 1.0.1-CDS.0 → 1.0.1-CDS.10
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/body/DisplayBodyCell.js +3 -1
- package/dist/body/components/CheckBoxView.js +4 -1
- package/dist/body/components/DeleteCellView.js +1 -0
- package/dist/header/CustomCell.js +1 -1
- package/dist/header/DefaultThemConfig.js +1 -1
- package/dist/header/components/CheckBoxView.js +10 -3
- package/dist/header/components/DeleteCellView.js +40 -4
- package/dist/header/components/RemoveAllDialog.js +4 -2
- package/dist/pagination/CustomPagination.js +23 -1
- package/dist/toolbar/ManageColumnView.js +4 -1
- package/package.json +3 -3
- package/src/body/DisplayBodyCell.js +29 -27
- package/src/body/components/CheckBoxView.js +1 -0
- package/src/body/components/DataFormatView.js +12 -12
- package/src/body/components/DeleteCellView.js +1 -0
- package/src/header/CustomCell.js +1 -1
- package/src/header/DefaultThemConfig.js +1 -1
- package/src/header/components/CheckBoxView.js +10 -6
- package/src/header/components/DeleteCellView.js +48 -7
- package/src/header/components/RemoveAllDialog.js +1 -2
- package/src/pagination/CustomPagination.js +15 -0
- package/src/toolbar/ManageColumnView.js +1 -0
|
@@ -61,7 +61,9 @@ const ViewCell = _ref2 => {
|
|
|
61
61
|
column: column
|
|
62
62
|
});
|
|
63
63
|
default:
|
|
64
|
-
return /*#__PURE__*/_react.default.createElement(_core.Typography, null, row[column.dataField]
|
|
64
|
+
return /*#__PURE__*/_react.default.createElement(_core.Typography, null, typeof row[column.dataField] === 'number' ? Intl.NumberFormat('en-US', {
|
|
65
|
+
maximumFractionDigits: 0
|
|
66
|
+
}).format(row[column.dataField]) : row[column.dataField]);
|
|
65
67
|
}
|
|
66
68
|
};
|
|
67
69
|
const DisplayCell = _ref3 => {
|
|
@@ -21,7 +21,10 @@ const CheckboxView = _ref => {
|
|
|
21
21
|
}, /*#__PURE__*/_react.default.createElement(_core.Checkbox, {
|
|
22
22
|
disableRipple: true,
|
|
23
23
|
onClick: event => onRowSelectChange(event, row),
|
|
24
|
-
checked: row.isChecked
|
|
24
|
+
checked: row.isChecked,
|
|
25
|
+
inputProps: {
|
|
26
|
+
'aria-label': 'checkbox'
|
|
27
|
+
}
|
|
25
28
|
})));
|
|
26
29
|
};
|
|
27
30
|
var _default = CheckboxView;
|
|
@@ -23,6 +23,7 @@ const DeleteCellView = _ref => {
|
|
|
23
23
|
}, customCellRender ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, customCellRender(row, onDeleteRow)) : /*#__PURE__*/_react.default.createElement(_core.IconButton, {
|
|
24
24
|
disableRipple: true,
|
|
25
25
|
className: "del_row_btn",
|
|
26
|
+
"aria-label": "Delete row",
|
|
26
27
|
onClick: () => column.cellEventHandler(row)
|
|
27
28
|
}, /*#__PURE__*/_react.default.createElement(_icons.DeleteOutline, {
|
|
28
29
|
className: "del_row_btn_icon",
|
|
@@ -49,7 +49,7 @@ const CustomHeaderCell = _ref => {
|
|
|
49
49
|
}
|
|
50
50
|
// return default view
|
|
51
51
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children);
|
|
52
|
-
}, []);
|
|
52
|
+
}, [components, tooltipText]);
|
|
53
53
|
return /*#__PURE__*/_react.default.createElement(_TableCell.default, {
|
|
54
54
|
scope: "col",
|
|
55
55
|
active: sortBy === dataField,
|
|
@@ -16,12 +16,19 @@ const CheckboxView = _ref => {
|
|
|
16
16
|
return /*#__PURE__*/_react.default.createElement(_core.TableCell, {
|
|
17
17
|
padding: "checkbox"
|
|
18
18
|
}, /*#__PURE__*/_react.default.createElement(_core.FormControlLabel, {
|
|
19
|
-
control: /*#__PURE__*/_react.default.createElement(
|
|
19
|
+
control: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("span", {
|
|
20
|
+
style: {
|
|
21
|
+
display: 'none'
|
|
22
|
+
}
|
|
23
|
+
}, "select all checkbox"), /*#__PURE__*/_react.default.createElement(_core.Checkbox, {
|
|
20
24
|
color: "primary",
|
|
21
25
|
indeterminate: includeSelectedIds,
|
|
22
26
|
checked: includeSelectedIds,
|
|
23
|
-
onChange: event => toggleSelectAll(event, Ids, includeSelectedIds)
|
|
24
|
-
|
|
27
|
+
onChange: event => toggleSelectAll(event, Ids, includeSelectedIds),
|
|
28
|
+
inputProps: {
|
|
29
|
+
'aria-label': 'select all checkbox'
|
|
30
|
+
}
|
|
31
|
+
}))
|
|
25
32
|
}));
|
|
26
33
|
};
|
|
27
34
|
var _default = CheckboxView;
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _core = require("@material-ui/core");
|
|
9
|
+
var _Tooltip = _interopRequireDefault(require("@material-ui/core/Tooltip"));
|
|
9
10
|
var _icons = require("@material-ui/icons");
|
|
10
11
|
var _RemoveAllDialog = _interopRequireDefault(require("./RemoveAllDialog"));
|
|
11
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -16,6 +17,7 @@ const TooltipContent = () => /*#__PURE__*/_react.default.createElement(_core.Typ
|
|
|
16
17
|
}, ' ', "Remove", ' ', /*#__PURE__*/_react.default.createElement("b", null, "All"), ' ', "items in cart.", ' ');
|
|
17
18
|
const DeleteCellView = _ref => {
|
|
18
19
|
let {
|
|
20
|
+
classes,
|
|
19
21
|
column,
|
|
20
22
|
count,
|
|
21
23
|
onDeleteAllFiles
|
|
@@ -25,12 +27,34 @@ const DeleteCellView = _ref => {
|
|
|
25
27
|
const {
|
|
26
28
|
customColHeaderRender
|
|
27
29
|
} = column;
|
|
30
|
+
const CustomTooltip = (0, _react.useCallback)(_ref2 => {
|
|
31
|
+
let {
|
|
32
|
+
children
|
|
33
|
+
} = _ref2;
|
|
34
|
+
// return custom tooltips
|
|
35
|
+
if (column && column.Tooltip) {
|
|
36
|
+
const CustomToolTip = column.Tooltip;
|
|
37
|
+
return /*#__PURE__*/_react.default.createElement(CustomToolTip, null, children);
|
|
38
|
+
}
|
|
39
|
+
// return default tooltip
|
|
40
|
+
if (column && column.tooltipText) {
|
|
41
|
+
return /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
|
|
42
|
+
id: "header-tooltip",
|
|
43
|
+
title: column.tooltipText
|
|
44
|
+
}, children);
|
|
45
|
+
}
|
|
46
|
+
// return default view
|
|
47
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children);
|
|
48
|
+
}, [column]);
|
|
28
49
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_core.TableCell, {
|
|
29
50
|
scope: "col",
|
|
30
51
|
className: "del_all_row"
|
|
31
|
-
}, customColHeaderRender ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, customColHeaderRender(toggleDialogDisplay)) : /*#__PURE__*/_react.default.createElement(
|
|
32
|
-
className:
|
|
33
|
-
},
|
|
52
|
+
}, customColHeaderRender ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, customColHeaderRender(toggleDialogDisplay)) : /*#__PURE__*/_react.default.createElement("span", {
|
|
53
|
+
className: classes.cellContentWrapper
|
|
54
|
+
}, /*#__PURE__*/_react.default.createElement(CustomTooltip, null, /*#__PURE__*/_react.default.createElement(_core.Typography, {
|
|
55
|
+
component: "span",
|
|
56
|
+
className: "del_all_row_text ".concat(classes.delAllRowText)
|
|
57
|
+
}, "Remove")), /*#__PURE__*/_react.default.createElement(_core.Tooltip, {
|
|
34
58
|
id: "del_all_row_tooltip",
|
|
35
59
|
className: "del_all_row_tooltip",
|
|
36
60
|
title: TooltipContent(),
|
|
@@ -49,5 +73,17 @@ const DeleteCellView = _ref => {
|
|
|
49
73
|
onDeleteAllFiles: onDeleteAllFiles
|
|
50
74
|
})));
|
|
51
75
|
};
|
|
52
|
-
|
|
76
|
+
const styles = () => ({
|
|
77
|
+
cellContentWrapper: {
|
|
78
|
+
display: 'inline-flex',
|
|
79
|
+
width: '100%',
|
|
80
|
+
height: '100%',
|
|
81
|
+
justifyContent: 'flex-start',
|
|
82
|
+
alignItems: 'center'
|
|
83
|
+
},
|
|
84
|
+
delAllRowText: {
|
|
85
|
+
lineHeight: '24px'
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
var _default = (0, _core.withStyles)(styles)(DeleteCellView);
|
|
53
89
|
exports.default = _default;
|
|
@@ -22,10 +22,12 @@ function RemoveAllDialogView(props) {
|
|
|
22
22
|
};
|
|
23
23
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_core.Dialog, {
|
|
24
24
|
open: open,
|
|
25
|
-
"aria-labelledby": "alert-dialog-title",
|
|
26
25
|
"aria-describedby": "alert-dialog-description"
|
|
27
26
|
}, /*#__PURE__*/_react.default.createElement(_core.DialogContent, null, /*#__PURE__*/_react.default.createElement(_core.DialogContentText, {
|
|
28
|
-
id: "alert-dialog-description"
|
|
27
|
+
id: "alert-dialog-description",
|
|
28
|
+
style: {
|
|
29
|
+
color: 'black'
|
|
30
|
+
}
|
|
29
31
|
}, "Remove", ' ', /*#__PURE__*/_react.default.createElement("b", null, "All files", ' (', count, ') '), "From Cart")), /*#__PURE__*/_react.default.createElement(_core.DialogActions, null, /*#__PURE__*/_react.default.createElement(_core.Button, {
|
|
30
32
|
className: "okBtn",
|
|
31
33
|
onClick: deleteAllFiles
|
|
@@ -59,7 +59,29 @@ const CustomPagination = _ref => {
|
|
|
59
59
|
rowsPerPage: rowsPerPage,
|
|
60
60
|
page: page,
|
|
61
61
|
onPageChange: onPageChange,
|
|
62
|
-
onRowsPerPageChange: onRowsPerPageChange
|
|
62
|
+
onRowsPerPageChange: onRowsPerPageChange,
|
|
63
|
+
labelRowsPerPage: /*#__PURE__*/_react.default.createElement("span", {
|
|
64
|
+
id: "rows-per-page-label"
|
|
65
|
+
}, "Rows per page:"),
|
|
66
|
+
labelDisplayedRows: _ref2 => {
|
|
67
|
+
let {
|
|
68
|
+
from,
|
|
69
|
+
to,
|
|
70
|
+
count: muiCount
|
|
71
|
+
} = _ref2;
|
|
72
|
+
return "".concat(from, "\u2013").concat(to, " OF ").concat(muiCount !== -1 ? Intl.NumberFormat('en-US', {
|
|
73
|
+
maximumFractionDigits: 0
|
|
74
|
+
}).format(muiCount || 0) : "more than ".concat(to));
|
|
75
|
+
},
|
|
76
|
+
SelectProps: {
|
|
77
|
+
inputProps: {
|
|
78
|
+
'aria-label': 'rows per page dropdown selector',
|
|
79
|
+
'aria-labelledby': 'rows-per-page-label',
|
|
80
|
+
style: {
|
|
81
|
+
visibility: 'hidden'
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
63
85
|
}));
|
|
64
86
|
};
|
|
65
87
|
CustomPagination.propTypes = {
|
|
@@ -65,7 +65,10 @@ const ManageColumnView = _ref => {
|
|
|
65
65
|
}),
|
|
66
66
|
disableRipple: true,
|
|
67
67
|
color: "secondary",
|
|
68
|
-
className: "checkBox"
|
|
68
|
+
className: "checkBox",
|
|
69
|
+
inputProps: {
|
|
70
|
+
'aria-label': 'checkbox'
|
|
71
|
+
}
|
|
69
72
|
}), column.icon && /*#__PURE__*/_react.default.createElement("img", {
|
|
70
73
|
src: column.icon,
|
|
71
74
|
alt: column.header,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bento-core/table",
|
|
3
|
-
"version": "1.0.1-CDS.
|
|
3
|
+
"version": "1.0.1-CDS.10",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"access": "public"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@bento-core/util": "^1.0.0"
|
|
16
|
+
"@bento-core/util": "^1.0.1-CDS.0"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"@apollo/client": "^3.6.9",
|
|
@@ -27,5 +27,5 @@
|
|
|
27
27
|
},
|
|
28
28
|
"author": "CTOS Bento Team",
|
|
29
29
|
"license": "ISC",
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "2f8251eb1f659f347dcb60824e9d986b91a6be7e"
|
|
31
31
|
}
|
|
@@ -32,33 +32,35 @@ const ViewCell = ({
|
|
|
32
32
|
}) => {
|
|
33
33
|
const { cellType } = column;
|
|
34
34
|
switch (cellType) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
35
|
+
case cellTypes.FORMAT_DATA:
|
|
36
|
+
return (
|
|
37
|
+
<DataFormatView
|
|
38
|
+
row={row}
|
|
39
|
+
column={column}
|
|
40
|
+
/>
|
|
41
|
+
);
|
|
42
|
+
case cellTypes.LINK:
|
|
43
|
+
return (
|
|
44
|
+
<CustomLinkView
|
|
45
|
+
row={row}
|
|
46
|
+
column={column}
|
|
47
|
+
/>
|
|
48
|
+
);
|
|
49
|
+
case cellTypes.CUSTOM_ELEM:
|
|
50
|
+
return (
|
|
51
|
+
<CustomComponent
|
|
52
|
+
row={row}
|
|
53
|
+
column={column}
|
|
54
|
+
/>
|
|
55
|
+
);
|
|
56
|
+
default:
|
|
57
|
+
return (
|
|
58
|
+
<Typography>
|
|
59
|
+
{typeof row[column.dataField] === 'number'
|
|
60
|
+
? Intl.NumberFormat('en-US', { maximumFractionDigits: 0 }).format(row[column.dataField])
|
|
61
|
+
: row[column.dataField]}
|
|
62
|
+
</Typography>
|
|
63
|
+
);
|
|
62
64
|
}
|
|
63
65
|
};
|
|
64
66
|
|
|
@@ -14,18 +14,18 @@ const CellView = ({
|
|
|
14
14
|
const { dataFormatType } = column;
|
|
15
15
|
const value = row[column?.dataField];
|
|
16
16
|
switch (dataFormatType) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
17
|
+
case dataFormatTypes.FORMAT_BYTES:
|
|
18
|
+
return (
|
|
19
|
+
<Typography>
|
|
20
|
+
{formatBytes(value)}
|
|
21
|
+
</Typography>
|
|
22
|
+
);
|
|
23
|
+
default:
|
|
24
|
+
return (
|
|
25
|
+
<Typography>
|
|
26
|
+
{value}
|
|
27
|
+
</Typography>
|
|
28
|
+
);
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
|
package/src/header/CustomCell.js
CHANGED
|
@@ -13,12 +13,16 @@ const CheckboxView = ({
|
|
|
13
13
|
<TableCell padding="checkbox">
|
|
14
14
|
<FormControlLabel
|
|
15
15
|
control={(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
<>
|
|
17
|
+
<span style={{ display: 'none' }}>select all checkbox</span>
|
|
18
|
+
<Checkbox
|
|
19
|
+
color="primary"
|
|
20
|
+
indeterminate={includeSelectedIds}
|
|
21
|
+
checked={includeSelectedIds}
|
|
22
|
+
onChange={(event) => toggleSelectAll(event, Ids, includeSelectedIds)}
|
|
23
|
+
inputProps={{ 'aria-label': 'select all checkbox' }}
|
|
24
|
+
/>
|
|
25
|
+
</>
|
|
22
26
|
)}
|
|
23
27
|
/>
|
|
24
28
|
</TableCell>
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
1
|
+
import React, { useCallback, useState } from 'react';
|
|
2
2
|
import {
|
|
3
3
|
TableCell,
|
|
4
4
|
Typography,
|
|
5
5
|
IconButton,
|
|
6
6
|
Tooltip,
|
|
7
|
+
withStyles,
|
|
7
8
|
} from '@material-ui/core';
|
|
9
|
+
import MuiTooltip from '@material-ui/core/Tooltip';
|
|
8
10
|
import {
|
|
9
11
|
ArrowDropDown as ArrowDropDownIcon,
|
|
10
12
|
} from '@material-ui/icons';
|
|
@@ -23,6 +25,7 @@ const TooltipContent = () => (
|
|
|
23
25
|
);
|
|
24
26
|
|
|
25
27
|
const DeleteCellView = ({
|
|
28
|
+
classes,
|
|
26
29
|
column,
|
|
27
30
|
count,
|
|
28
31
|
onDeleteAllFiles,
|
|
@@ -30,6 +33,29 @@ const DeleteCellView = ({
|
|
|
30
33
|
const [displayDialog, setDisplay] = useState(false);
|
|
31
34
|
const toggleDialogDisplay = () => setDisplay(!displayDialog);
|
|
32
35
|
const { customColHeaderRender } = column;
|
|
36
|
+
|
|
37
|
+
const CustomTooltip = useCallback(({ children }) => {
|
|
38
|
+
// return custom tooltips
|
|
39
|
+
if (column && column.Tooltip) {
|
|
40
|
+
const CustomToolTip = column.Tooltip;
|
|
41
|
+
return (
|
|
42
|
+
<CustomToolTip>
|
|
43
|
+
{children}
|
|
44
|
+
</CustomToolTip>
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
// return default tooltip
|
|
48
|
+
if (column && column.tooltipText) {
|
|
49
|
+
return (
|
|
50
|
+
<MuiTooltip id="header-tooltip" title={column.tooltipText}>
|
|
51
|
+
{children}
|
|
52
|
+
</MuiTooltip>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
// return default view
|
|
56
|
+
return <>{children}</>;
|
|
57
|
+
}, [column]);
|
|
58
|
+
|
|
33
59
|
return (
|
|
34
60
|
<>
|
|
35
61
|
<TableCell
|
|
@@ -42,10 +68,12 @@ const DeleteCellView = ({
|
|
|
42
68
|
{customColHeaderRender(toggleDialogDisplay)}
|
|
43
69
|
</>
|
|
44
70
|
) : (
|
|
45
|
-
|
|
46
|
-
<
|
|
47
|
-
|
|
48
|
-
|
|
71
|
+
<span className={classes.cellContentWrapper}>
|
|
72
|
+
<CustomTooltip>
|
|
73
|
+
<Typography component="span" className={`del_all_row_text ${classes.delAllRowText}`}>
|
|
74
|
+
Remove
|
|
75
|
+
</Typography>
|
|
76
|
+
</CustomTooltip>
|
|
49
77
|
<Tooltip
|
|
50
78
|
id="del_all_row_tooltip"
|
|
51
79
|
className="del_all_row_tooltip"
|
|
@@ -59,7 +87,7 @@ const DeleteCellView = ({
|
|
|
59
87
|
/>
|
|
60
88
|
</IconButton>
|
|
61
89
|
</Tooltip>
|
|
62
|
-
|
|
90
|
+
</span>
|
|
63
91
|
)
|
|
64
92
|
}
|
|
65
93
|
<RemoveAllDialogView
|
|
@@ -74,4 +102,17 @@ const DeleteCellView = ({
|
|
|
74
102
|
);
|
|
75
103
|
};
|
|
76
104
|
|
|
77
|
-
|
|
105
|
+
const styles = () => ({
|
|
106
|
+
cellContentWrapper: {
|
|
107
|
+
display: 'inline-flex',
|
|
108
|
+
width: '100%',
|
|
109
|
+
height: '100%',
|
|
110
|
+
justifyContent: 'flex-start',
|
|
111
|
+
alignItems: 'center',
|
|
112
|
+
},
|
|
113
|
+
delAllRowText: {
|
|
114
|
+
lineHeight: '24px',
|
|
115
|
+
},
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
export default withStyles(styles)(DeleteCellView);
|
|
@@ -24,11 +24,10 @@ function RemoveAllDialogView(props) {
|
|
|
24
24
|
<>
|
|
25
25
|
<Dialog
|
|
26
26
|
open={open}
|
|
27
|
-
aria-labelledby="alert-dialog-title"
|
|
28
27
|
aria-describedby="alert-dialog-description"
|
|
29
28
|
>
|
|
30
29
|
<DialogContent>
|
|
31
|
-
<DialogContentText id="alert-dialog-description">
|
|
30
|
+
<DialogContentText id="alert-dialog-description" style={{ color: 'black' }}>
|
|
32
31
|
Remove
|
|
33
32
|
{' '}
|
|
34
33
|
<b>
|
|
@@ -50,6 +50,21 @@ const CustomPagination = ({
|
|
|
50
50
|
page={page}
|
|
51
51
|
onPageChange={onPageChange}
|
|
52
52
|
onRowsPerPageChange={onRowsPerPageChange}
|
|
53
|
+
labelRowsPerPage={<span id="rows-per-page-label">Rows per page:</span>}
|
|
54
|
+
labelDisplayedRows={({ from, to, count: muiCount }) => `${from}–${to} OF ${
|
|
55
|
+
muiCount !== -1
|
|
56
|
+
? Intl.NumberFormat('en-US', { maximumFractionDigits: 0 }).format(muiCount || 0)
|
|
57
|
+
: `more than ${to}`
|
|
58
|
+
}`}
|
|
59
|
+
SelectProps={{
|
|
60
|
+
inputProps: {
|
|
61
|
+
'aria-label': 'rows per page dropdown selector',
|
|
62
|
+
'aria-labelledby': 'rows-per-page-label',
|
|
63
|
+
style: {
|
|
64
|
+
visibility: 'hidden',
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
}}
|
|
53
68
|
/>
|
|
54
69
|
</ThemeProvider>
|
|
55
70
|
);
|