diff --git a/app/src/protyle/render/av/cell.ts b/app/src/protyle/render/av/cell.ts index f2c53013a..5c753bbee 100644 --- a/app/src/protyle/render/av/cell.ts +++ b/app/src/protyle/render/av/cell.ts @@ -993,14 +993,20 @@ export const renderCell = (cellValue: IAVCellValue, rowIndex = 0, showIcon = tru } text += ""; } else if (cellValue.type === "rollup") { + let rollupType; cellValue?.rollup?.contents?.forEach((item) => { - const rollupText = ["template", "select", "mSelect", "mAsset", "checkbox", "relation"].includes(item.type) ? renderCell(item, rowIndex, showIcon, type) : renderRollup(item, showIcon); + const rollupText = ["template", "select", "mSelect", "mAsset", "relation"].includes(item.type) ? renderCell(item, rowIndex, showIcon, type) : renderRollup(item, showIcon); if (rollupText) { - text += rollupText + ", "; + text += rollupText + (item.type === "checkbox" ? "" : ", "); } + rollupType = item.type; }); - if (text && text.endsWith(", ")) { - text = text.substring(0, text.length - 2); + if (text) { + if (rollupType === "checkbox") { + text = `