@gpa-gemstone/react-table 1.2.86 → 1.2.88

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/Table/Table.js +5 -3
  2. package/package.json +10 -8
@@ -350,9 +350,9 @@ function Header(props) {
350
350
  const [filters, setFilters] = React.useState(((_a = props.Filters) !== null && _a !== void 0 ? _a : []));
351
351
  const [guid] = React.useState((0, helper_functions_1.CreateGuid)());
352
352
  const getLeftKey = React.useCallback((key, colWidthsRef) => {
353
- var _a;
354
353
  // Filtering down to shown adjustables only
355
- const keys = React.Children.map((_a = props.children) !== null && _a !== void 0 ? _a : [], (element) => {
354
+ var _a, _b;
355
+ const mapCallback = (element) => {
356
356
  var _a;
357
357
  if (!React.isValidElement(element))
358
358
  return null;
@@ -362,7 +362,9 @@ function Header(props) {
362
362
  if (IsColumnProps(element.props) && IsColumnAdjustable(element.props))
363
363
  return element.props.Key;
364
364
  return null;
365
- }).filter((item) => item !== null);
365
+ };
366
+ const children = (_a = props.children) !== null && _a !== void 0 ? _a : [];
367
+ const keys = ((_b = React.Children.map(children, mapCallback)) !== null && _b !== void 0 ? _b : []).filter((item) => item !== null);
366
368
  const index = keys.indexOf(key);
367
369
  if (index <= 0)
368
370
  return undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gpa-gemstone/react-table",
3
- "version": "1.2.86",
3
+ "version": "1.2.88",
4
4
  "description": "Table for GPA web applications",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -36,6 +36,8 @@
36
36
  "@typescript-eslint/eslint-plugin": "^5.60.0",
37
37
  "@typescript-eslint/parser": "^5.60.0",
38
38
  "@types/react-portal": "4.0.4",
39
+ "@types/lodash": "^4.14.171",
40
+ "@types/react": "18.2.0",
39
41
  "eslint": "^8.43.0",
40
42
  "jest": "^29.0.0",
41
43
  "prettier": "^2.3.2",
@@ -43,15 +45,15 @@
43
45
  "typescript": "5.5.3"
44
46
  },
45
47
  "dependencies": {
46
- "@gpa-gemstone/gpa-symbols": "0.0.56",
47
- "@gpa-gemstone/helper-functions": "0.0.47",
48
- "@gpa-gemstone/react-interactive": "1.0.163",
49
- "@types/lodash": "^4.14.171",
50
- "@types/react": "^17.0.14",
48
+ "@gpa-gemstone/gpa-symbols": "0.0.57",
49
+ "@gpa-gemstone/helper-functions": "0.0.48",
50
+ "@gpa-gemstone/react-interactive": "1.0.165",
51
51
  "lodash": "^4.17.21",
52
- "react": "^18.2.0",
53
- "react-dom": "18.2.0",
54
52
  "react-portal": "4.2.2"
55
53
  },
54
+ "peerDependencies": {
55
+ "react": "18.2.0",
56
+ "react-dom": "18.2.0"
57
+ },
56
58
  "publishConfig": {"access": "public"}
57
59
  }