mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-27 20:08:49 +01:00
🎨 Candidate values of the database relation fields are no longer subject to view filtering https://github.com/siyuan-note/siyuan/issues/10411
This commit is contained in:
parent
bc6d6b17f7
commit
0dc8f1752d
2 changed files with 28 additions and 1 deletions
|
|
@ -49,12 +49,18 @@ func GetAttributeViewPrimaryKeyValues(avID string, page, pageSize int) (attribut
|
|||
attributeViewName = attrView.Name
|
||||
|
||||
keyValues = attrView.GetBlockKeyValues()
|
||||
// 不在视图中的值要过滤掉
|
||||
// 过滤掉不在视图中的值
|
||||
tmp := map[string]*av.Value{}
|
||||
for _, kv := range keyValues.Values {
|
||||
for _, view := range attrView.Views {
|
||||
switch view.LayoutType {
|
||||
case av.LayoutTypeTable:
|
||||
if !kv.IsDetached {
|
||||
if nil == treenode.GetBlockTree(kv.BlockID) {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if gulu.Str.Contains(kv.Block.ID, view.Table.RowIDs) {
|
||||
tmp[kv.Block.ID] = kv
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue