trotl-table 1.0.47 → 1.0.49
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.
- package/dist/Table.cjs.js +17 -7
- package/dist/Table.cjs.js.map +1 -1
- package/dist/Table.esm.js +17 -7
- package/dist/Table.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/Table.cjs.js
CHANGED
|
@@ -9699,7 +9699,6 @@ function TableInner({
|
|
|
9699
9699
|
return translations[key] || key;
|
|
9700
9700
|
};
|
|
9701
9701
|
}
|
|
9702
|
-
|
|
9703
9702
|
// Use refs for callbacks to prevent infinite loops from dependency changes
|
|
9704
9703
|
const selectedRowsCallbackRef = React.useRef(selectedRowsCallback);
|
|
9705
9704
|
const refreshTriggerRef = React.useRef(refreshTrigger);
|
|
@@ -10390,6 +10389,16 @@ function TableInner({
|
|
|
10390
10389
|
key,
|
|
10391
10390
|
style
|
|
10392
10391
|
}) => {
|
|
10392
|
+
// override virtualization's fixed width so that flex-based cells can
|
|
10393
|
+
// expand/contract with the header. without this the header adjusts but
|
|
10394
|
+
// rows keep the original pixel width from the first render, leading to
|
|
10395
|
+
// the mismatched behaviour described by the user.
|
|
10396
|
+
const fullStyle = {
|
|
10397
|
+
...style,
|
|
10398
|
+
width: "100%",
|
|
10399
|
+
boxSizing: "border-box",
|
|
10400
|
+
paddingRight: headerPadRight || 0
|
|
10401
|
+
};
|
|
10393
10402
|
const item = tableDataFlat[index];
|
|
10394
10403
|
if (!item) return null;
|
|
10395
10404
|
if (item.type === "group") {
|
|
@@ -10422,7 +10431,7 @@ function TableInner({
|
|
|
10422
10431
|
ref: ref,
|
|
10423
10432
|
key: key,
|
|
10424
10433
|
style: {
|
|
10425
|
-
...
|
|
10434
|
+
...fullStyle,
|
|
10426
10435
|
background: '#f6f6fa',
|
|
10427
10436
|
border: '2px dashed #bbb',
|
|
10428
10437
|
textAlign: 'center',
|
|
@@ -10472,7 +10481,7 @@ function TableInner({
|
|
|
10472
10481
|
// Default: normal group header
|
|
10473
10482
|
return /*#__PURE__*/React.createElement("div", {
|
|
10474
10483
|
key: key,
|
|
10475
|
-
style:
|
|
10484
|
+
style: fullStyle,
|
|
10476
10485
|
className: "table-row group-row",
|
|
10477
10486
|
onClick: () => toggleGroup(gid)
|
|
10478
10487
|
}, enableMultiSelect && showDelete && /*#__PURE__*/React.createElement("div", {
|
|
@@ -10533,14 +10542,15 @@ function TableInner({
|
|
|
10533
10542
|
};
|
|
10534
10543
|
const content = /*#__PURE__*/React.createElement("div", {
|
|
10535
10544
|
key: key,
|
|
10536
|
-
style:
|
|
10545
|
+
style: fullStyle,
|
|
10537
10546
|
className: "table-row"
|
|
10538
10547
|
}, /*#__PURE__*/React.createElement("div", {
|
|
10539
10548
|
className: "row-main",
|
|
10540
10549
|
onDoubleClick: doubleClickEnable ? handleRowDoubleClick : undefined,
|
|
10541
10550
|
style: {
|
|
10542
10551
|
display: 'flex',
|
|
10543
|
-
flex: 1
|
|
10552
|
+
flex: '1 1 0%',
|
|
10553
|
+
minWidth: 0
|
|
10544
10554
|
}
|
|
10545
10555
|
}, enableMultiSelect && showDelete && /*#__PURE__*/React.createElement("div", {
|
|
10546
10556
|
className: "table-cell checkbox-cell"
|
|
@@ -10612,8 +10622,8 @@ function TableInner({
|
|
|
10612
10622
|
}, showIcons ? /*#__PURE__*/React.createElement("span", {
|
|
10613
10623
|
role: "img",
|
|
10614
10624
|
"aria-hidden": "false",
|
|
10615
|
-
title: translate("
|
|
10616
|
-
}, "\uD83D\
|
|
10625
|
+
title: translate("delete")
|
|
10626
|
+
}, "\uD83D\uDDD1\uFE0F") : translate("delete")), showShare && /*#__PURE__*/React.createElement("button", {
|
|
10617
10627
|
className: "action-btn-table",
|
|
10618
10628
|
onClick: () => shareCallbackRef.current(row),
|
|
10619
10629
|
onDoubleClick: e => e.stopPropagation(),
|