mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 10:00:13 +01:00
🎨 Database grouping by field https://github.com/siyuan-note/siyuan/issues/10964
This commit is contained in:
parent
49cc87381c
commit
33a1bedb41
2 changed files with 3 additions and 1 deletions
|
|
@ -1619,6 +1619,8 @@ func genAttrViewViewGroups(view *av.View, attrView *av.AttributeView) {
|
|||
logging.LogWarnf("unknown layout type [%s] for group view", view.LayoutType)
|
||||
return
|
||||
}
|
||||
|
||||
v.GroupItemIDs = []string{}
|
||||
for _, item := range groupItems {
|
||||
v.GroupItemIDs = append(v.GroupItemIDs, item.GetID())
|
||||
}
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ func generateAttrViewItems(attrView *av.AttributeView, view *av.View) (ret map[s
|
|||
}
|
||||
|
||||
// 如果是分组视图,则需要过滤掉不在分组中的项目
|
||||
if 0 < len(view.GroupItemIDs) {
|
||||
if nil != view.GroupItemIDs {
|
||||
tmp := map[string][]*av.KeyValues{}
|
||||
for _, groupItemID := range view.GroupItemIDs {
|
||||
if _, ok := ret[groupItemID]; ok {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue