mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-18 15:40:12 +01:00
🎨 Add Relation column to database table view https://github.com/siyuan-note/siyuan/issues/9888
This commit is contained in:
parent
356b6748c9
commit
9d72566876
2 changed files with 4 additions and 5 deletions
|
|
@ -865,7 +865,7 @@ func updateAttributeViewColRelation(operation *Operation) (err error) {
|
|||
for _, v := range destAv.Views {
|
||||
switch v.LayoutType {
|
||||
case av.LayoutTypeTable:
|
||||
v.Table.Columns = append(v.Table.Columns, &av.ViewTableColumn{ID: operation.KeyID})
|
||||
v.Table.Columns = append(v.Table.Columns, &av.ViewTableColumn{ID: operation.BackRelationKeyID})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -600,10 +600,9 @@ func renderAttributeViewTable(attrView *av.AttributeView, view *av.View) (ret *a
|
|||
|
||||
// 组装列
|
||||
for _, col := range view.Table.Columns {
|
||||
key, getErr := attrView.GetKey(col.ID)
|
||||
if nil != getErr {
|
||||
err = getErr
|
||||
return
|
||||
key, _ := attrView.GetKey(col.ID)
|
||||
if nil == key {
|
||||
continue
|
||||
}
|
||||
|
||||
ret.Columns = append(ret.Columns, &av.TableColumn{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue