twico-ui 1.36.0 → 1.36.1

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/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to Twico UI are documented here (newest first). This file is generated automatically on each release by [semantic-release](https://semantic-release.gitbook.io/) from [Conventional Commits](https://www.conventionalcommits.org/) — do not edit it by hand. The same notes appear on each [GitHub Release](https://github.com/EncryptionL/twico-ui/releases).
4
4
 
5
+ ## [1.36.1](https://github.com/EncryptionL/twico-ui/compare/v1.36.0...v1.36.1) (2026-09-09)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **datatable:** runtime combine into a valueGetter/renderCell target ([#369](https://github.com/EncryptionL/twico-ui/issues/369)) ([6363f38](https://github.com/EncryptionL/twico-ui/commit/6363f38ffd2b754dc7be9ddb6f47cbfc9bab10e2)), closes [#338](https://github.com/EncryptionL/twico-ui/issues/338)
11
+
5
12
  # [1.36.0](https://github.com/EncryptionL/twico-ui/compare/v1.35.0...v1.36.0) (2026-09-09)
6
13
 
7
14
 
package/dist/index.cjs CHANGED
@@ -9381,7 +9381,7 @@ function Datatable({
9381
9381
  for (const c of columnsProp) if (c && c.field != null) byField[c.field] = c;
9382
9382
  return [DIFF_OP_COLUMN, ...columnsProp.map((c) => {
9383
9383
  const cfg = combineCfg(userCombine[c.field] || c.combine);
9384
- const base = cfg && !c.valueGetter ? { ...c, valueGetter: combineValueGetter(combineSrcCols(cfg, byField), cfg) } : c;
9384
+ const base = cfg && (!!userCombine[c.field] || !c.valueGetter) ? { ...c, valueGetter: combineValueGetter(combineSrcCols(cfg, byField), cfg) } : c;
9385
9385
  return { ...base, renderCell: (val, row) => renderDiffCell(base, val, row) };
9386
9386
  })];
9387
9387
  },
@@ -9432,15 +9432,17 @@ function Datatable({
9432
9432
  const cfg = combineCfg(userCombine[c.field] || c.combine);
9433
9433
  if (!cfg) continue;
9434
9434
  const srcCols = combineSrcCols(cfg, byField);
9435
+ const explicit = !!userCombine[c.field];
9436
+ const useJoin = explicit || !c.valueGetter;
9435
9437
  out[i] = {
9436
9438
  ...c,
9437
9439
  editable: false,
9438
9440
  // the combined value is synthetic — inline editing would write to a phantom field
9439
- valueGetter: c.valueGetter || combineValueGetter(srcCols, cfg),
9440
- // Consumer renderCell wins. If they overrode only valueGetter, fall back to the DEFAULT cell render
9441
- // (renderCell: undefined) so the cell shows THEIR value — keeping display in sync with what
9442
- // sort/filter/search/export use — rather than the auto source-join. Otherwise render the combined cell.
9443
- renderCell: c.renderCell || (c.valueGetter ? void 0 : ((value, row) => renderCombined(srcCols, row, cfg)))
9441
+ valueGetter: useJoin ? combineValueGetter(srcCols, cfg) : c.valueGetter,
9442
+ // In diff mode the diff `columns` memo already wrapped renderCell in renderDiffCell (over the enriched
9443
+ // combined value) — keep that wrapper, or an EXPLICIT combine's `!explicit` short-circuit would strip the
9444
+ // diff arrows / old→new styling (#369 review). Declarative diff already preserved it (c.renderCell truthy).
9445
+ renderCell: isDiff ? c.renderCell : !explicit && c.renderCell || (useJoin ? ((value, row) => renderCombined(srcCols, row, cfg)) : void 0)
9444
9446
  };
9445
9447
  }
9446
9448
  return out;