mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-25 09:46:10 +01:00
🎨 Reduce the delay in adding rows in database table view https://github.com/siyuan-note/siyuan/issues/10082
This commit is contained in:
parent
d5e098a285
commit
3bfbfbc7e9
3 changed files with 41 additions and 2 deletions
|
|
@ -38,6 +38,27 @@ import (
|
|||
"github.com/siyuan-note/siyuan/kernel/util"
|
||||
)
|
||||
|
||||
func GetAttributeViewFilterSort(id string) (filters []*av.ViewFilter, sorts []*av.ViewSort) {
|
||||
waitForSyncingStorages()
|
||||
|
||||
attrView, err := av.ParseAttributeView(id)
|
||||
if nil != err {
|
||||
logging.LogErrorf("parse attribute view [%s] failed: %s", id, err)
|
||||
return
|
||||
}
|
||||
|
||||
filters = []*av.ViewFilter{}
|
||||
sorts = []*av.ViewSort{}
|
||||
for _, view := range attrView.Views {
|
||||
switch view.LayoutType {
|
||||
case av.LayoutTypeTable:
|
||||
filters = view.Table.Filters
|
||||
sorts = view.Table.Sorts
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func SearchAttributeViewNonRelationKey(avID, keyword string) (ret []*av.Key) {
|
||||
waitForSyncingStorages()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue