🎨 Database select field supports sorting by option order Fix https://github.com/siyuan-note/siyuan/issues/10665

This commit is contained in:
Daniel 2024-03-21 10:03:08 +08:00
parent d522a74654
commit 30d95605df
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
4 changed files with 30 additions and 15 deletions

View file

@ -153,7 +153,7 @@ func (table *Table) GetID() string {
return table.ID
}
func (table *Table) SortRows() {
func (table *Table) SortRows(attrView *AttributeView) {
if 1 > len(table.Sorts) {
return
}
@ -220,7 +220,7 @@ func (table *Table) SortRows() {
return colIndexSort.Order != SortOrderAsc
}
result := val1.Compare(val2)
result := val1.Compare(val2, attrView)
if 0 == result {
sorted = false
continue