🎨 Adding row overwriting data after enabling sort in database Fix https://github.com/siyuan-note/siyuan/issues/9517
This commit is contained in:
parent
de9347fc97
commit
71dd27c62a
1 changed files with 5 additions and 0 deletions
|
@ -610,6 +610,11 @@ func (table *Table) SortRows() {
|
|||
}
|
||||
|
||||
sort.Slice(table.Rows, func(i, j int) bool {
|
||||
block := table.Rows[i].GetBlockValue()
|
||||
if !block.IsInitialized && nil != block.Block && "" == block.Block.Content && block.IsDetached {
|
||||
return false
|
||||
}
|
||||
|
||||
for _, colIndexSort := range colIndexSorts {
|
||||
result := table.Rows[i].Cells[colIndexSort.Index].Value.Compare(table.Rows[j].Cells[colIndexSort.Index].Value)
|
||||
if 0 == result {
|
||||
|
|
Loading…
Add table
Reference in a new issue