trotl-table 1.0.75 → 1.0.77
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 +4 -43
- package/dist/Table.cjs.js.map +1 -1
- package/dist/Table.esm.js +4 -43
- package/dist/Table.esm.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/package.json +1 -1
package/dist/Table.cjs.js
CHANGED
|
@@ -10248,36 +10248,6 @@ function TableInner({
|
|
|
10248
10248
|
}
|
|
10249
10249
|
return map;
|
|
10250
10250
|
}, [sortedGroupedData, groupKey]);
|
|
10251
|
-
const selectedRowsDetails = React.useMemo(() => {
|
|
10252
|
-
const selectedIdSet = new Set(selectedRows);
|
|
10253
|
-
const items = [];
|
|
10254
|
-
if (isGrouped) {
|
|
10255
|
-
for (const g of normalizedGroups) {
|
|
10256
|
-
const groupMeta = {
|
|
10257
|
-
groupId: g.groupId ?? null,
|
|
10258
|
-
groupName: g.groupName ?? null
|
|
10259
|
-
};
|
|
10260
|
-
for (const row of g.rows || []) {
|
|
10261
|
-
if (row && selectedIdSet.has(row.id)) {
|
|
10262
|
-
items.push({
|
|
10263
|
-
row,
|
|
10264
|
-
group: groupMeta
|
|
10265
|
-
});
|
|
10266
|
-
}
|
|
10267
|
-
}
|
|
10268
|
-
}
|
|
10269
|
-
} else {
|
|
10270
|
-
for (const row of Array.isArray(localData) ? localData : []) {
|
|
10271
|
-
if (row && selectedIdSet.has(row.id)) {
|
|
10272
|
-
items.push({
|
|
10273
|
-
row,
|
|
10274
|
-
group: null
|
|
10275
|
-
});
|
|
10276
|
-
}
|
|
10277
|
-
}
|
|
10278
|
-
}
|
|
10279
|
-
return items;
|
|
10280
|
-
}, [selectedRows, isGrouped, normalizedGroups, localData]);
|
|
10281
10251
|
const [tableDataFlat, setTableDataFlat] = React.useState([]);
|
|
10282
10252
|
const flattened = React.useMemo(() => {
|
|
10283
10253
|
const items = [];
|
|
@@ -10358,8 +10328,8 @@ function TableInner({
|
|
|
10358
10328
|
React.useEffect(() => {
|
|
10359
10329
|
// Only call the callback if selectedRows actually changed
|
|
10360
10330
|
// Use the ref to avoid infinite loops from callback changing on every render
|
|
10361
|
-
selectedRowsCallbackRef.current?.(selectedRows
|
|
10362
|
-
}, [selectedRows
|
|
10331
|
+
selectedRowsCallbackRef.current?.(selectedRows);
|
|
10332
|
+
}, [selectedRows]);
|
|
10363
10333
|
|
|
10364
10334
|
// DELETE
|
|
10365
10335
|
const [showConfirm, setShowConfirm] = React.useState(false);
|
|
@@ -10919,14 +10889,8 @@ function TableInner({
|
|
|
10919
10889
|
} : undefined
|
|
10920
10890
|
}), /*#__PURE__*/React.createElement("div", {
|
|
10921
10891
|
className: "table-cell group-header",
|
|
10922
|
-
style: {
|
|
10923
|
-
width: '100%'
|
|
10924
|
-
},
|
|
10925
10892
|
title: `${translate(item.groupName)} (0)`
|
|
10926
|
-
}, item.expanded ? "▾" : "▸", " ", translate(item.groupName), " (0) \u2014 ", translate("DropHereToMoveIntoThisGroup")),
|
|
10927
|
-
key: i,
|
|
10928
|
-
className: "table-cell"
|
|
10929
|
-
})), showActions && /*#__PURE__*/React.createElement("div", {
|
|
10893
|
+
}, item.expanded ? "▾" : "▸", " ", translate(item.groupName), " (0) \u2014 ", translate("DropHereToMoveIntoThisGroup")), showActions && /*#__PURE__*/React.createElement("div", {
|
|
10930
10894
|
className: "table-cell action-cell",
|
|
10931
10895
|
style: actionColumnStyle
|
|
10932
10896
|
}));
|
|
@@ -10964,10 +10928,7 @@ function TableInner({
|
|
|
10964
10928
|
}), /*#__PURE__*/React.createElement("div", {
|
|
10965
10929
|
className: "table-cell group-header",
|
|
10966
10930
|
title: `${translate(item.groupName)} (${item.rowCount})`
|
|
10967
|
-
}, item.expanded ? "▾" : "▸", " ", translate(item.groupName), " (", item.rowCount, ")"),
|
|
10968
|
-
key: i,
|
|
10969
|
-
className: "table-cell"
|
|
10970
|
-
})), showActions && /*#__PURE__*/React.createElement("div", {
|
|
10931
|
+
}, item.expanded ? "▾" : "▸", " ", translate(item.groupName), " (", item.rowCount, ")"), showActions && /*#__PURE__*/React.createElement("div", {
|
|
10971
10932
|
className: "table-cell action-cell",
|
|
10972
10933
|
style: actionColumnStyle
|
|
10973
10934
|
}));
|