mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
🎨 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 {
|
switch view.LayoutType {
|
||||||
case av.LayoutTypeTable:
|
case av.LayoutTypeTable:
|
||||||
for i, column := range view.Table.Columns {
|
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:]...)
|
view.Table.Columns = append(view.Table.Columns[:i], view.Table.Columns[i+1:]...)
|
||||||
break
|
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})
|
util.BroadcastByType("protyle", "refreshAttributeView", 0, "", map[string]interface{}{"id": destAv.ID})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue