🎨 Add Relation column to database table view https://github.com/siyuan-note/siyuan/issues/9888
This commit is contained in:
parent
c0353ca5bc
commit
0d57661632
1 changed files with 2 additions and 1 deletions
|
@ -1917,7 +1917,7 @@ func removeAttributeViewColumn(operation *Operation) (err error) {
|
|||
switch view.LayoutType {
|
||||
case av.LayoutTypeTable:
|
||||
for i, column := range view.Table.Columns {
|
||||
if column.ID == removedKey.ID {
|
||||
if column.ID == removedKey.Relation.BackKeyID {
|
||||
view.Table.Columns = append(view.Table.Columns[:i], view.Table.Columns[i+1:]...)
|
||||
break
|
||||
}
|
||||
|
@ -1925,6 +1925,7 @@ func removeAttributeViewColumn(operation *Operation) (err error) {
|
|||
}
|
||||
}
|
||||
|
||||
av.SaveAttributeView(destAv)
|
||||
util.BroadcastByType("protyle", "refreshAttributeView", 0, "", map[string]interface{}{"id": destAv.ID})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue