Vanessa 2024-01-04 21:23:46 +08:00
parent 2c40963e5e
commit f21ecce2a3
2 changed files with 3 additions and 3 deletions

View file

@ -568,7 +568,7 @@ export const renderCell = (cellValue: IAVCellValue, wrap: boolean) => {
}
} else if (cellValue.type === "relation") {
cellValue?.relation?.contents?.forEach((item, index) => {
text += `<span class="av__celltext--ref" style="margin-right: 8px" data-id="${cellValue?.relation?.blockIDs[index]}">${item}</span>`;
text += `<span class="av__celltext--ref" style="margin-right: 8px" data-id="${cellValue?.relation?.blockIDs[index]}">${item || "Untitled"}</span>`;
});
}
if (["text", "template", "url", "email", "phone", "number", "date", "created", "updated"].includes(cellValue.type) &&

View file

@ -237,7 +237,7 @@ export const bindRelationEvent = (options: {
if (hasId) {
avData.view.rows.find((item) => {
if (item.id === hasId) {
selectHTML += genSelectItemHTML("selected", item.id, item.cells[cellIndex].value.block.content || item.cells[cellIndex].value.block.id);
selectHTML += genSelectItemHTML("selected", item.id, item.cells[cellIndex].value.block.content || "Untitled");
return true;
}
});
@ -245,7 +245,7 @@ export const bindRelationEvent = (options: {
});
avData.view.rows.forEach((item) => {
if (!hasIds.includes(item.id)) {
html += genSelectItemHTML("unselect", item.id, item.cells[cellIndex].value.block.content || item.cells[cellIndex].value.block.id);
html += genSelectItemHTML("unselect", item.id, item.cells[cellIndex].value.block.content || "Untitled");
}
});
options.menuElement.innerHTML = `<div class="b3-menu__items">${selectHTML || genSelectItemHTML("empty")}