@gpa-gemstone/react-table 1.2.54 → 1.2.56
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.
|
@@ -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
|
|
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);
|
|
@@ -278,8 +278,6 @@ function AdjustableTable(props) {
|
|
|
278
278
|
React.createElement("tr", { style: props.RowStyle !== undefined ? Object.assign({}, props.RowStyle) : {} }, props.LastRow))) : null));
|
|
279
279
|
}
|
|
280
280
|
function Rows(props) {
|
|
281
|
-
if (props.Data.length === 0)
|
|
282
|
-
return null;
|
|
283
281
|
const onClick = React.useCallback((e, item, index) => {
|
|
284
282
|
if (props.OnClick !== undefined)
|
|
285
283
|
props.OnClick({
|
|
@@ -290,7 +288,7 @@ function Rows(props) {
|
|
|
290
288
|
index: index,
|
|
291
289
|
}, e);
|
|
292
290
|
}, [props.OnClick]);
|
|
293
|
-
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]);
|
|
294
292
|
return (React.createElement("tbody", { style: bodyStyle, className: props.BodyClass, ref: props.BodyRef }, props.Data.map((d, i) => {
|
|
295
293
|
const style = props.RowStyle !== undefined ? Object.assign({}, props.RowStyle) : {};
|
|
296
294
|
if (style.cursor === undefined && (props.OnClick !== undefined || props.DragStart !== undefined))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gpa-gemstone/react-table",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.56",
|
|
4
4
|
"description": "Table for GPA web applications",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"typescript": "5.5.3"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@gpa-gemstone/gpa-symbols": "0.0.
|
|
45
|
+
"@gpa-gemstone/gpa-symbols": "0.0.43",
|
|
46
46
|
"@gpa-gemstone/helper-functions": "0.0.35",
|
|
47
47
|
"@types/lodash": "^4.14.171",
|
|
48
48
|
"@types/react": "^17.0.14",
|