🎨 Improve render database relation and rollup field https://github.com/siyuan-note/siyuan/issues/12865

This commit is contained in:
Daniel 2024-10-22 17:41:57 +08:00
parent 6a3c280639
commit 507f4bfa77
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -811,7 +811,7 @@ export const renderCell = (cellValue: IAVCellValue, rowIndex = 0) => {
cellValue?.rollup?.contents?.forEach((item) => {
const rollupText = ["select", "mSelect", "mAsset", "checkbox", "relation"].includes(item.type) ? renderCell(item) : renderRollup(item);
if (rollupText) {
text += rollupText + ", ";
text += rollupText + " ";
}
});
if (text && text.endsWith(", ")) {
@ -820,7 +820,7 @@ export const renderCell = (cellValue: IAVCellValue, rowIndex = 0) => {
} else if (cellValue.type === "relation") {
cellValue?.relation?.contents?.forEach((item) => {
if (item && item.block) {
text += renderRollup(item) + ", ";
text += renderRollup(item) + " ";
}
});
if (text && text.endsWith(", ")) {