@gpa-gemstone/react-table 1.2.5 → 1.2.6

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.
Files changed (2) hide show
  1. package/lib/SelectTable.js +10 -6
  2. package/package.json +3 -3
@@ -32,10 +32,14 @@ var __assign = (this && this.__assign) || function () {
32
32
  };
33
33
  return __assign.apply(this, arguments);
34
34
  };
35
- var __spreadArray = (this && this.__spreadArray) || function (to, from) {
36
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
37
- to[j] = from[i];
38
- return to;
35
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
36
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
37
+ if (ar || !(i in from)) {
38
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
39
+ ar[i] = from[i];
40
+ }
41
+ }
42
+ return to.concat(ar || Array.prototype.slice.call(from));
39
43
  };
40
44
  Object.defineProperty(exports, "__esModule", { value: true });
41
45
  exports.SelectTable = void 0;
@@ -74,7 +78,7 @@ function SelectTable(props) {
74
78
  function handleClick(d, event) {
75
79
  var sIndex = selected.findIndex(function (item) { return item === d.row[props.KeyField]; });
76
80
  if (sIndex === -1)
77
- setSelected(function (od) { return __spreadArray(__spreadArray([], od), [d.row[props.KeyField]]); });
81
+ setSelected(function (od) { return __spreadArray(__spreadArray([], od, true), [d.row[props.KeyField]], false); });
78
82
  else
79
83
  setSelected(function (od) { return od.filter(function (item) { return item !== d.row[props.KeyField]; }); });
80
84
  }
@@ -99,7 +103,7 @@ function SelectTable(props) {
99
103
  React.createElement("i", { className: "fa fa-check-square-o fa-3x" }));
100
104
  return null;
101
105
  } }
102
- ], props.cols),
106
+ ], props.cols, true),
103
107
  data: data,
104
108
  onClick: handleClick,
105
109
  sortKey: sortKey,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gpa-gemstone/react-table",
3
- "version": "1.2.5",
3
+ "version": "1.2.6",
4
4
  "description": "Table for GPA web applications",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -42,10 +42,10 @@
42
42
  "ts-jest": "^27.0.3",
43
43
  "tslint": "^6.1.3",
44
44
  "tslint-config-prettier": "^1.18.0",
45
- "typescript": "4.3.4"
45
+ "typescript": "4.4.4"
46
46
  },
47
47
  "dependencies": {
48
- "@gpa-gemstone/helper-functions": "0.0.9",
48
+ "@gpa-gemstone/helper-functions": "",
49
49
  "@types/lodash": "^4.14.171",
50
50
  "@types/react": "^17.0.14",
51
51
  "lodash": "^4.17.21",