mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-07 16:04:19 +01:00
♻️ Refactor av data structure
This commit is contained in:
parent
96530382f2
commit
dfa561c62c
2 changed files with 30 additions and 0 deletions
|
|
@ -267,6 +267,10 @@ func (table *Table) GetID() string {
|
|||
}
|
||||
|
||||
func (table *Table) SortRows() {
|
||||
sort.Slice(table.Rows, func(i, j int) bool { return table.Rows[i].ID < table.Rows[j].ID })
|
||||
|
||||
// sort by row ids
|
||||
|
||||
if 1 > len(table.Sorts) {
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue