Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Preserve database relation primary column width https://github.com/siyuan-note/siyuan/issues/12315

Daniel3c67a4636a77
diff --git a/app/src/protyle/render/av/relation.ts b/app/src/protyle/render/av/relation.ts
index e2a3d1baba..ec8dbc2df0 100644
--- a/app/src/protyle/render/av/relation.ts
+++ b/app/src/protyle/render/av/relation.ts
@@ -391,7 +391,10 @@ const getRelationGridTemplate = (columns: IAVColumn[], rows: IAVRow[],
groups: [],
rowCount: rows.length,
} as IAVTable, getCellValueText, measureText);
- return `32px ${columns.map((column) => widths[column.id] || "64px").join(" ")}`;
+ return `32px ${columns.map((column, index) => {
+ const width = widths[column.id] || "64px";
+ return index === 0 ? `${Math.max(240, parseFloat(width))}px` : width;
+ }).join(" ")}`;
};
const getRelationPrimaryCell = (row: IAVRow) => {