mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 08:30:12 +01:00
🎨 Database grouping by field https://github.com/siyuan-note/siyuan/issues/10964
This commit is contained in:
parent
61bc821754
commit
a90df6841c
2 changed files with 5 additions and 5 deletions
|
|
@ -1557,7 +1557,7 @@ func renderAttributeView(attrView *av.AttributeView, blockID, viewID, query stri
|
|||
|
||||
var groups []av.Viewable
|
||||
for _, groupView := range view.Groups {
|
||||
groupViewable := sql.RenderGroupView(attrView, view, groupView)
|
||||
groupViewable := sql.RenderGroupView(attrView, view, groupView, query)
|
||||
err = renderViewableInstance(groupViewable, view, attrView, page, pageSize)
|
||||
if nil != err {
|
||||
return
|
||||
|
|
@ -1856,7 +1856,7 @@ func genAttrViewViewGroups(view *av.View, attrView *av.AttributeView) {
|
|||
if av.GroupOrderDesc == view.Group.Order {
|
||||
slices.Reverse(relativeDateGroups)
|
||||
}
|
||||
|
||||
|
||||
view.Groups = relativeDateGroups
|
||||
} else {
|
||||
sort.SliceStable(view.Groups, func(i, j int) bool {
|
||||
|
|
@ -3216,7 +3216,7 @@ func getNewValueByNearItem(nearItem av.Item, key *av.Key, blockID string) (ret *
|
|||
}
|
||||
|
||||
func getNearItem(attrView *av.AttributeView, view, groupView *av.View, previousItemID string) (ret av.Item) {
|
||||
viewable := sql.RenderGroupView(attrView, view, groupView)
|
||||
viewable := sql.RenderGroupView(attrView, view, groupView, "")
|
||||
av.Filter(viewable, attrView)
|
||||
av.Sort(viewable, attrView)
|
||||
items := viewable.(av.Collection).GetItems()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue