trotl-table 1.0.76 → 1.0.78

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.esm.js CHANGED
@@ -10226,36 +10226,6 @@ function TableInner({
10226
10226
  }
10227
10227
  return map;
10228
10228
  }, [sortedGroupedData, groupKey]);
10229
- const selectedRowsDetails = useMemo(() => {
10230
- const selectedIdSet = new Set(selectedRows);
10231
- const items = [];
10232
- if (isGrouped) {
10233
- for (const g of normalizedGroups) {
10234
- const groupMeta = {
10235
- groupId: g.groupId ?? null,
10236
- groupName: g.groupName ?? null
10237
- };
10238
- for (const row of g.rows || []) {
10239
- if (row && selectedIdSet.has(row.id)) {
10240
- items.push({
10241
- row,
10242
- group: groupMeta
10243
- });
10244
- }
10245
- }
10246
- }
10247
- } else {
10248
- for (const row of Array.isArray(localData) ? localData : []) {
10249
- if (row && selectedIdSet.has(row.id)) {
10250
- items.push({
10251
- row,
10252
- group: null
10253
- });
10254
- }
10255
- }
10256
- }
10257
- return items;
10258
- }, [selectedRows, isGrouped, normalizedGroups, localData]);
10259
10229
  const [tableDataFlat, setTableDataFlat] = useState([]);
10260
10230
  const flattened = useMemo(() => {
10261
10231
  const items = [];
@@ -10336,8 +10306,8 @@ function TableInner({
10336
10306
  useEffect(() => {
10337
10307
  // Only call the callback if selectedRows actually changed
10338
10308
  // Use the ref to avoid infinite loops from callback changing on every render
10339
- selectedRowsCallbackRef.current?.(selectedRows, selectedRowsDetails);
10340
- }, [selectedRows, selectedRowsDetails]);
10309
+ selectedRowsCallbackRef.current?.(selectedRows);
10310
+ }, [selectedRows]);
10341
10311
 
10342
10312
  // DELETE
10343
10313
  const [showConfirm, setShowConfirm] = useState(false);
@@ -10897,14 +10867,8 @@ function TableInner({
10897
10867
  } : undefined
10898
10868
  }), /*#__PURE__*/React__default.createElement("div", {
10899
10869
  className: "table-cell group-header",
10900
- style: {
10901
- width: '100%'
10902
- },
10903
10870
  title: `${translate(item.groupName)} (0)`
10904
- }, item.expanded ? "▾" : "▸", " ", translate(item.groupName), " (0) \u2014 ", translate("DropHereToMoveIntoThisGroup")), columns.slice(1).map((_, i) => /*#__PURE__*/React__default.createElement("div", {
10905
- key: i,
10906
- className: "table-cell"
10907
- })), showActions && /*#__PURE__*/React__default.createElement("div", {
10871
+ }, item.expanded ? "▾" : "▸", " ", translate(item.groupName), " (0) \u2014 ", translate("DropHereToMoveIntoThisGroup")), showActions && /*#__PURE__*/React__default.createElement("div", {
10908
10872
  className: "table-cell action-cell",
10909
10873
  style: actionColumnStyle
10910
10874
  }));
@@ -10942,10 +10906,7 @@ function TableInner({
10942
10906
  }), /*#__PURE__*/React__default.createElement("div", {
10943
10907
  className: "table-cell group-header",
10944
10908
  title: `${translate(item.groupName)} (${item.rowCount})`
10945
- }, item.expanded ? "▾" : "▸", " ", translate(item.groupName), " (", item.rowCount, ")"), columns.slice(1).map((_, i) => /*#__PURE__*/React__default.createElement("div", {
10946
- key: i,
10947
- className: "table-cell"
10948
- })), showActions && /*#__PURE__*/React__default.createElement("div", {
10909
+ }, item.expanded ? "▾" : "▸", " ", translate(item.groupName), " (", item.rowCount, ")"), showActions && /*#__PURE__*/React__default.createElement("div", {
10949
10910
  className: "table-cell action-cell",
10950
10911
  style: actionColumnStyle
10951
10912
  }));