From 511190d633222838577a1049253db237cb8d17d1 Mon Sep 17 00:00:00 2001 From: Erica-cod <2779428708@qq.com> Date: Fri, 20 Mar 2026 23:54:34 -0400 Subject: [PATCH] fix: radio cell should fallback to text in aggregation row #4027 Made-with: Cursor --- ...aggregation-row-4027_2026-03-21-03-53.json | 11 ++++ .../scenegraph/group-creater/cell-helper.ts | 66 +++++++++++++------ 2 files changed, 58 insertions(+), 19 deletions(-) create mode 100644 common/changes/@visactor/vtable/fix-radio-aggregation-row-4027_2026-03-21-03-53.json diff --git a/common/changes/@visactor/vtable/fix-radio-aggregation-row-4027_2026-03-21-03-53.json b/common/changes/@visactor/vtable/fix-radio-aggregation-row-4027_2026-03-21-03-53.json new file mode 100644 index 000000000..d14bfb897 --- /dev/null +++ b/common/changes/@visactor/vtable/fix-radio-aggregation-row-4027_2026-03-21-03-53.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "fix: radio cell should fallback to text in aggregation row", + "type": "patch", + "packageName": "@visactor/vtable" + } + ], + "packageName": "@visactor/vtable", + "email": "2779428708@qq.com" +} \ No newline at end of file diff --git a/packages/vtable/src/scenegraph/group-creater/cell-helper.ts b/packages/vtable/src/scenegraph/group-creater/cell-helper.ts index 88217769e..335cfd049 100644 --- a/packages/vtable/src/scenegraph/group-creater/cell-helper.ts +++ b/packages/vtable/src/scenegraph/group-creater/cell-helper.ts @@ -423,25 +423,53 @@ export function createCell( ); } } else if (type === 'radio') { - const createRadioCellGroup = Factory.getFunction('createRadioCellGroup') as CreateRadioCellGroup; - cellGroup = createRadioCellGroup( - null, - columnGroup, - 0, - y, - col, - row, - colWidth, - cellWidth, - cellHeight, - padding, - textAlign, - textBaseline, - table, - cellTheme, - define as RadioColumnDefine, - range - ); + const isAggregation = + 'isAggregation' in table.internalProps.layoutMap && table.internalProps.layoutMap.isAggregation(col, row); + const isSeriesNumber = table.internalProps.layoutMap.isSeriesNumber(col, row); + if (isAggregation && isSeriesNumber) { + const createTextCellGroup = Factory.getFunction('createTextCellGroup') as CreateTextCellGroup; + cellGroup = createTextCellGroup( + table, + value, + columnGroup, + 0, + y, + col, + row, + colWidth, + cellWidth, + cellHeight, + padding, + textAlign, + textBaseline, + false, + undefined, + true, + cellTheme, + range, + isAsync + ); + } else { + const createRadioCellGroup = Factory.getFunction('createRadioCellGroup') as CreateRadioCellGroup; + cellGroup = createRadioCellGroup( + null, + columnGroup, + 0, + y, + col, + row, + colWidth, + cellWidth, + cellHeight, + padding, + textAlign, + textBaseline, + table, + cellTheme, + define as RadioColumnDefine, + range + ); + } } else if (type === 'switch') { const createSwitchCellGroup = Factory.getFunction('createSwitchCellGroup') as CreateSwitchCellGroup; cellGroup = createSwitchCellGroup(