From 16519d0082058fa3d6a620a56800e8ae73aaaf50 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 25 Dec 2023 00:23:26 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/9888 --- app/src/protyle/render/av/cell.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/src/protyle/render/av/cell.ts b/app/src/protyle/render/av/cell.ts index a09c0576b..8528e6a68 100644 --- a/app/src/protyle/render/av/cell.ts +++ b/app/src/protyle/render/av/cell.ts @@ -141,6 +141,11 @@ export const genCellValue = (colType: TAVCol, value: string | any) => { checked: value ? true : false } }; + } else if (colType === "relation") { + cellValue = { + type: colType, + relation: {blockIDs: [], contents: []} + }; } } else { if (colType === "mSelect" || colType === "select") { @@ -506,7 +511,7 @@ export const updateCellsValue = (protyle: IProtyle, nodeElement: HTMLElement, va if (!rowElement) { return; } - const type = getTypeByCellElement(item) || item.dataset.type; + const type = getTypeByCellElement(item) || item.dataset.type as TAVCol; if (["created", "updated", "template"].includes(type)) { return; } @@ -535,7 +540,7 @@ export const updateCellsValue = (protyle: IProtyle, nodeElement: HTMLElement, va if (!hasClosestByClassName(cellElements[0], "custom-attr")) { updateAttrViewCellAnimation(item, cellValue); } else { - item.innerHTML = genAVValueHTML(cellValue) + item.innerHTML = genAVValueHTML(cellValue) } }); if (doOperations.length > 0) {