@gpa-gemstone/react-table 1.2.55 → 1.2.57

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.
@@ -53,6 +53,7 @@ interface TableProps<T> {
53
53
  TheadClass?: string;
54
54
  /**
55
55
  * style of the tbody component
56
+ * Note: Display style overwritten to "block"
56
57
  */
57
58
  TbodyStyle?: React.CSSProperties;
58
59
  /**
@@ -122,8 +122,8 @@ function AdjustableTable(props) {
122
122
  if (numOfColsWithUndefinedCSS > 0 && numOfColsWithAutoCSS == 0) { // Split only on the css undefined if there are no auto-cols
123
123
  colsToDivideBy = numOfColsWithUndefinedCSS;
124
124
  }
125
- const extraSpace = (currentTableWidth - colW - numEnabledColumns) / colsToDivideBy;
126
- setExtraWidthPerRow(extraSpace);
125
+ const extraSpace = (currentTableWidth - colW) / colsToDivideBy;
126
+ setExtraWidthPerRow(Math.floor(extraSpace));
127
127
  (_a = props.ReduceWidthCallback) === null || _a === void 0 ? void 0 : _a.call(props, hideKeys);
128
128
  setAutoWidthVersion((v) => v + 1);
129
129
  }, 500);
@@ -288,13 +288,13 @@ function Rows(props) {
288
288
  index: index,
289
289
  }, e);
290
290
  }, [props.OnClick]);
291
- const bodyStyle = React.useMemo(() => (Object.assign(Object.assign({}, props.BodyStyle), { paddingRight: (props.BodyScrolled ? 0 : 17) })), [props.BodyStyle, props.BodyScrolled]);
291
+ const bodyStyle = React.useMemo(() => (Object.assign(Object.assign({}, props.BodyStyle), { paddingRight: (props.BodyScrolled ? 0 : 17), display: "block" })), [props.BodyStyle, props.BodyScrolled]);
292
292
  return (React.createElement("tbody", { style: bodyStyle, className: props.BodyClass, ref: props.BodyRef }, props.Data.map((d, i) => {
293
293
  const style = props.RowStyle !== undefined ? Object.assign({}, props.RowStyle) : {};
294
294
  if (style.cursor === undefined && (props.OnClick !== undefined || props.DragStart !== undefined))
295
295
  style.cursor = 'pointer';
296
296
  if (props.Selected !== undefined && props.Selected(d, i))
297
- style.backgroundColor = 'yellow';
297
+ style.backgroundColor = 'var(--warning)';
298
298
  const key = props.KeySelector(d, i);
299
299
  return (React.createElement("tr", { key: key, style: style, onClick: (e) => onClick(e, d, i) }, React.Children.map(props.children, (element) => {
300
300
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gpa-gemstone/react-table",
3
- "version": "1.2.55",
3
+ "version": "1.2.57",
4
4
  "description": "Table for GPA web applications",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -42,8 +42,8 @@
42
42
  "typescript": "5.5.3"
43
43
  },
44
44
  "dependencies": {
45
- "@gpa-gemstone/gpa-symbols": "0.0.42",
46
- "@gpa-gemstone/helper-functions": "0.0.35",
45
+ "@gpa-gemstone/gpa-symbols": "0.0.44",
46
+ "@gpa-gemstone/helper-functions": "0.0.36",
47
47
  "@types/lodash": "^4.14.171",
48
48
  "@types/react": "^17.0.14",
49
49
  "lodash": "^4.17.21",