mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-05 15:11:48 +01:00
🎨 Database grouping by field https://github.com/siyuan-note/siyuan/issues/10964
This commit is contained in:
parent
91a4578859
commit
89dc7c62e7
16 changed files with 40 additions and 29 deletions
|
|
@ -1365,6 +1365,11 @@ func genGroup(view *av.View, attrView *av.AttributeView) {
|
|||
items = append(items, item)
|
||||
}
|
||||
|
||||
groupKey, _ := attrView.GetKey(group.Field)
|
||||
if nil == groupKey {
|
||||
return
|
||||
}
|
||||
|
||||
var rangeStart, rangeEnd float64
|
||||
switch group.Method {
|
||||
case av.GroupMethodValue:
|
||||
|
|
@ -1487,9 +1492,12 @@ func genGroup(view *av.View, attrView *av.AttributeView) {
|
|||
for _, item := range groupItems {
|
||||
v.GroupItemIDs = append(v.GroupItemIDs, item.GetID())
|
||||
}
|
||||
|
||||
if defaultGroupName == name {
|
||||
name = fmt.Sprintf(Conf.language(264), groupKey.Name)
|
||||
}
|
||||
v.Name = name
|
||||
view.Groups = append(view.Groups, v)
|
||||
view.GroupDefault = name == defaultGroupName
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue