@bento-core/table 1.0.1-ccdihub.3 → 1.0.1-ccdihub.5
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.
|
@@ -7,6 +7,12 @@ exports.default = void 0;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _core = require("@material-ui/core");
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
11
|
+
const label = {
|
|
12
|
+
inputProps: {
|
|
13
|
+
'aria-label': 'Checkbox item'
|
|
14
|
+
}
|
|
15
|
+
};
|
|
10
16
|
const CheckboxView = _ref => {
|
|
11
17
|
let {
|
|
12
18
|
includeSelectedIds,
|
|
@@ -15,14 +21,12 @@ const CheckboxView = _ref => {
|
|
|
15
21
|
} = _ref;
|
|
16
22
|
return /*#__PURE__*/_react.default.createElement(_core.TableCell, {
|
|
17
23
|
padding: "checkbox"
|
|
18
|
-
}, /*#__PURE__*/_react.default.createElement(_core.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
})
|
|
25
|
-
}));
|
|
24
|
+
}, /*#__PURE__*/_react.default.createElement(_core.Checkbox, _extends({}, label, {
|
|
25
|
+
color: "primary",
|
|
26
|
+
indeterminate: includeSelectedIds,
|
|
27
|
+
checked: includeSelectedIds,
|
|
28
|
+
onChange: event => toggleSelectAll(event, Ids, includeSelectedIds)
|
|
29
|
+
})));
|
|
26
30
|
};
|
|
27
31
|
var _default = CheckboxView;
|
|
28
32
|
exports.default = _default;
|
|
@@ -59,7 +59,13 @@ const CustomPagination = _ref => {
|
|
|
59
59
|
rowsPerPage: rowsPerPage,
|
|
60
60
|
page: page,
|
|
61
61
|
onPageChange: onPageChange,
|
|
62
|
-
onRowsPerPageChange: onRowsPerPageChange
|
|
62
|
+
onRowsPerPageChange: onRowsPerPageChange,
|
|
63
|
+
SelectProps: {
|
|
64
|
+
inputProps: {
|
|
65
|
+
'aria-label': 'Selection dropdown for displaying the number of results per page'
|
|
66
|
+
},
|
|
67
|
+
native: true
|
|
68
|
+
}
|
|
63
69
|
}));
|
|
64
70
|
};
|
|
65
71
|
CustomPagination.propTypes = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bento-core/table",
|
|
3
|
-
"version": "1.0.1-ccdihub.
|
|
3
|
+
"version": "1.0.1-ccdihub.5",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "npm run lint && cross-env-shell rm -rf dist && NODE_ENV=production BABEL_ENV=es babel src --out-dir dist --copy-files",
|
|
@@ -2,24 +2,22 @@ import React from 'react';
|
|
|
2
2
|
import {
|
|
3
3
|
TableCell,
|
|
4
4
|
Checkbox,
|
|
5
|
-
FormControlLabel,
|
|
6
5
|
} from '@material-ui/core';
|
|
7
6
|
|
|
7
|
+
const label = { inputProps: { 'aria-label': 'Checkbox item' } };
|
|
8
|
+
|
|
8
9
|
const CheckboxView = ({
|
|
9
10
|
includeSelectedIds,
|
|
10
11
|
toggleSelectAll,
|
|
11
12
|
Ids,
|
|
12
13
|
}) => (
|
|
13
14
|
<TableCell padding="checkbox">
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
onChange={(event) => toggleSelectAll(event, Ids, includeSelectedIds)}
|
|
21
|
-
/>
|
|
22
|
-
)}
|
|
15
|
+
<Checkbox
|
|
16
|
+
{...label}
|
|
17
|
+
color="primary"
|
|
18
|
+
indeterminate={includeSelectedIds}
|
|
19
|
+
checked={includeSelectedIds}
|
|
20
|
+
onChange={(event) => toggleSelectAll(event, Ids, includeSelectedIds)}
|
|
23
21
|
/>
|
|
24
22
|
</TableCell>
|
|
25
23
|
);
|
|
@@ -50,6 +50,10 @@ const CustomPagination = ({
|
|
|
50
50
|
page={page}
|
|
51
51
|
onPageChange={onPageChange}
|
|
52
52
|
onRowsPerPageChange={onRowsPerPageChange}
|
|
53
|
+
SelectProps={{
|
|
54
|
+
inputProps: { 'aria-label': 'Selection dropdown for displaying the number of results per page' },
|
|
55
|
+
native: true,
|
|
56
|
+
}}
|
|
53
57
|
/>
|
|
54
58
|
</ThemeProvider>
|
|
55
59
|
);
|