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 +7 -0
- package/dist/index.cjs +8 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.mjs +8 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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:
|
|
9440
|
-
//
|
|
9441
|
-
//
|
|
9442
|
-
//
|
|
9443
|
-
renderCell: c.renderCell
|
|
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;
|