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 = `
${text}
`; + } else if (text.endsWith(", ")) { + text = text.substring(0, text.length - 2); + } } } else if (cellValue.type === "relation") { cellValue?.relation?.contents?.forEach((item, index) => { @@ -1050,6 +1056,8 @@ const renderRollup = (cellValue: IAVCellValue, showIcon: boolean) => { } } else if (cellValue.type === "number") { text = cellValue?.number.formattedContent || cellValue?.number.content.toString() || ""; + } else if (cellValue.type === "checkbox") { + text += ``; } else if (["date", "updated", "created"].includes(cellValue.type)) { const dataValue = cellValue ? cellValue[cellValue.type as "date"] : null; if (dataValue.formattedContent) {