@stokr/components-library 2.3.35 → 2.3.36

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.
@@ -30,23 +30,29 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
30
30
  var ReactTableWrapper = function ReactTableWrapper(props) {
31
31
  var makeNewColumns = function makeNewColumns(data) {
32
32
  return data === null || data === void 0 ? void 0 : data.map(function (column) {
33
- if (column.key === 'dropdown' || column.accessor === 'dropdown') {
33
+ if (column.key === 'dropdown') {
34
34
  return {
35
35
  Header: function Header() {
36
36
  return null;
37
37
  },
38
- id: column.key || column.accessor,
38
+ id: column.key,
39
39
  Cell: function Cell(_ref) {
40
40
  var row = _ref.row;
41
- return /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement(_Table.TableDropdownIcon, {
42
- isActive: row.isExpanded
43
- }));
41
+ return (
42
+ /*#__PURE__*/
43
+ // Use Cell to render an expander for dropdown cell.
44
+ // We can use the getToggleRowExpandedProps prop-getter
45
+ // to build the expander. (moved to the whole row to make it easier to click)
46
+ _react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement(_Table.TableDropdownIcon, {
47
+ isActive: row.isExpanded
48
+ }))
49
+ );
44
50
  }
45
51
  };
46
52
  }
47
53
  return {
48
- Header: column.Header || column.label,
49
- accessor: column.accessor || column.key
54
+ Header: column.label,
55
+ accessor: column.key
50
56
  };
51
57
  });
52
58
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stokr/components-library",
3
- "version": "2.3.35",
3
+ "version": "2.3.36",
4
4
  "description": "STOKR - Components Library",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",