@bento-core/table 1.0.1-icdc.11 → 1.0.1-icdc.12

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.
@@ -26,8 +26,7 @@ const ActionHeaderCell = _ref => {
26
26
  return /*#__PURE__*/_react.default.createElement(_CheckBoxView.default, {
27
27
  includeSelectedIds: includeSelectedIds,
28
28
  toggleSelectAll: toggleSelectAll,
29
- Ids: Ids,
30
- rows: rows
29
+ Ids: Ids
31
30
  });
32
31
  }
33
32
  if (_Types.cellTypes.DELETE === cellType) {
@@ -7,34 +7,23 @@ 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
- const useStyles = (0, _core.makeStyles)({
11
- label: {
12
- opacity: '0'
13
- }
14
- });
15
10
  const CheckboxView = _ref => {
16
11
  let {
17
12
  includeSelectedIds,
18
13
  toggleSelectAll,
19
- Ids,
20
- rows
14
+ Ids
21
15
  } = _ref;
22
- const {
23
- label
24
- } = useStyles();
25
16
  return /*#__PURE__*/_react.default.createElement(_core.TableCell, {
26
17
  padding: "checkbox",
27
18
  component: "td"
28
- }, /*#__PURE__*/_react.default.createElement(_core.FormControlLabel, {
29
- classes: {
30
- label
19
+ }, /*#__PURE__*/_react.default.createElement(_core.Checkbox, {
20
+ color: "primary",
21
+ indeterminate: includeSelectedIds,
22
+ checked: includeSelectedIds,
23
+ inputProps: {
24
+ 'aria-label': 'checkbox'
31
25
  },
32
- control: /*#__PURE__*/_react.default.createElement(_core.Checkbox, {
33
- color: "primary",
34
- indeterminate: includeSelectedIds,
35
- checked: includeSelectedIds,
36
- onChange: event => toggleSelectAll(event, Ids, includeSelectedIds, rows)
37
- })
26
+ onChange: event => toggleSelectAll(event, Ids, includeSelectedIds)
38
27
  }));
39
28
  };
40
29
  var _default = CheckboxView;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bento-core/table",
3
- "version": "1.0.1-icdc.11",
3
+ "version": "1.0.1-icdc.12",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -20,7 +20,6 @@ const ActionHeaderCell = ({
20
20
  includeSelectedIds={includeSelectedIds}
21
21
  toggleSelectAll={toggleSelectAll}
22
22
  Ids={Ids}
23
- rows={rows}
24
23
  />
25
24
  );
26
25
  }
@@ -2,40 +2,24 @@ import React from 'react';
2
2
  import {
3
3
  TableCell,
4
4
  Checkbox,
5
- FormControlLabel,
6
- makeStyles,
7
5
  } from '@material-ui/core';
8
6
 
9
- const useStyles = makeStyles({
10
- label: {
11
- opacity: '0',
12
- },
13
- });
14
-
15
7
  const CheckboxView = ({
16
8
  includeSelectedIds,
17
9
  toggleSelectAll,
18
10
  Ids,
19
- rows,
20
- }) => {
21
- const { label } = useStyles();
22
- return (
23
- <TableCell padding="checkbox" component="td">
24
- <FormControlLabel
25
- classes={{
26
- label,
27
- }}
28
- control={(
29
- <Checkbox
30
- color="primary"
31
- indeterminate={includeSelectedIds}
32
- checked={includeSelectedIds}
33
- onChange={(event) => toggleSelectAll(event, Ids, includeSelectedIds, rows)}
34
- />
35
- )}
36
- />
37
- </TableCell>
38
- );
39
- };
11
+ }) => (
12
+ <TableCell padding="checkbox" component="td">
13
+ <Checkbox
14
+ color="primary"
15
+ indeterminate={includeSelectedIds}
16
+ checked={includeSelectedIds}
17
+ inputProps={{
18
+ 'aria-label': 'checkbox',
19
+ }}
20
+ onChange={(event) => toggleSelectAll(event, Ids, includeSelectedIds)}
21
+ />
22
+ </TableCell>
23
+ );
40
24
 
41
25
  export default CheckboxView;