@gpa-gemstone/react-table 1.2.60 → 1.2.62

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.
@@ -121,7 +121,7 @@ function Table(props) {
121
121
  if (React.isValidElement(element) && IsColumnProps(element.props)) {
122
122
  if (newMap.get(element.props.Key) != null)
123
123
  console.error("Multiple of the same key detected in table, this will cause issues.");
124
- newMap.set(element.props.Key, { minWidth: 10, maxWidth: 1000, width: 100 });
124
+ newMap.set(element.props.Key, { minWidth: 10, maxWidth: undefined, width: 100 });
125
125
  }
126
126
  });
127
127
  // If width is the same and keys are identical, we can skip the operation
@@ -197,9 +197,9 @@ function Table(props) {
197
197
  // This follows behavior consistent with MDN documentation on how these width types should behave
198
198
  if (widthObj.minWidth > widthObj.width)
199
199
  widthObj.width = widthObj.minWidth;
200
- if (widthObj.minWidth > widthObj.maxWidth)
200
+ if (widthObj.maxWidth != null && widthObj.minWidth > widthObj.maxWidth)
201
201
  widthObj.maxWidth = widthObj.minWidth;
202
- if (widthObj.width > widthObj.maxWidth)
202
+ if (widthObj.maxWidth != null && widthObj.width > widthObj.maxWidth)
203
203
  widthObj.width = widthObj.maxWidth;
204
204
  // Constrain Width to remainingSpace
205
205
  if (widthObj.width > remainingSpace)
@@ -376,9 +376,9 @@ function Header(props) {
376
376
  if (widthObjLeft == null || widthObjRight == null)
377
377
  return ({ min: -Infinity, max: Infinity });
378
378
  const limitByShrinkLeft = widthObjLeft.width - widthObjLeft.minWidth;
379
- const limitByGrowthLeft = widthObjLeft.maxWidth - widthObjLeft.width;
379
+ const limitByGrowthLeft = widthObjLeft.maxWidth == null ? Number.MAX_SAFE_INTEGER : (widthObjLeft.maxWidth - widthObjLeft.width);
380
380
  const limitByShrinkRight = widthObjRight.width - widthObjRight.minWidth;
381
- const limitByGrowthRight = widthObjRight.maxWidth - widthObjRight.width;
381
+ const limitByGrowthRight = widthObjRight.maxWidth == null ? Number.MAX_SAFE_INTEGER : (widthObjRight.maxWidth - widthObjRight.width);
382
382
  // Recall that a left movement is a negative deltaW
383
383
  const minDeltaW = -(limitByShrinkLeft < limitByGrowthRight ? limitByShrinkLeft : limitByGrowthRight);
384
384
  const maxDeltaW = limitByShrinkRight < limitByGrowthLeft ? limitByShrinkRight : limitByGrowthLeft;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gpa-gemstone/react-table",
3
- "version": "1.2.60",
3
+ "version": "1.2.62",
4
4
  "description": "Table for GPA web applications",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -45,7 +45,7 @@
45
45
  "dependencies": {
46
46
  "@gpa-gemstone/gpa-symbols": "0.0.46",
47
47
  "@gpa-gemstone/helper-functions": "0.0.37",
48
- "@gpa-gemstone/react-interactive": "1.0.139",
48
+ "@gpa-gemstone/react-interactive": "1.0.140",
49
49
  "@types/lodash": "^4.14.171",
50
50
  "@types/react": "^17.0.14",
51
51
  "lodash": "^4.17.21",