mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 16:58:49 +01:00
🎨 Adding row overwriting data after enabling sort in database https://github.com/siyuan-note/siyuan/issues/9599
This commit is contained in:
parent
b685754f61
commit
bbbdda7ef0
2 changed files with 4 additions and 6 deletions
|
|
@ -626,11 +626,6 @@ 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 {
|
||||
|
|
|
|||
|
|
@ -712,7 +712,10 @@ func addAttributeViewBlock(blockID string, operation *Operation, tree *parse.Tre
|
|||
return
|
||||
}
|
||||
} else {
|
||||
blockID = ast.NewNodeID()
|
||||
if "" == blockID {
|
||||
blockID = ast.NewNodeID()
|
||||
logging.LogWarnf("detached block id is empty, generate a new one [%s]", blockID)
|
||||
}
|
||||
}
|
||||
|
||||
attrView, err := av.ParseAttributeView(operation.AvID)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue