mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 02:20:13 +01:00
🐛 Database table view sorts abnormally after deleting numeric values Fix https://github.com/siyuan-note/siyuan/issues/10476
This commit is contained in:
parent
1635b4b8c2
commit
a650764c12
2 changed files with 29 additions and 1 deletions
|
|
@ -2534,10 +2534,14 @@ func UpdateAttributeViewCell(tx *Transaction, avID, keyID, rowID, cellID string,
|
|||
|
||||
if av.KeyTypeNumber == val.Type {
|
||||
if nil != val.Number && !val.Number.IsNotEmpty {
|
||||
// 删除内容为空值
|
||||
val.Number.Content = 0
|
||||
val.Number.FormattedContent = ""
|
||||
}
|
||||
} else if av.KeyTypeDate == val.Type {
|
||||
if nil != val.Date && !val.Date.IsNotEmpty {
|
||||
val.Date.Content = 0
|
||||
val.Date.FormattedContent = ""
|
||||
}
|
||||
}
|
||||
|
||||
relationChangeMode := 0 // 0:不变(仅排序),1:增加,2:减少
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue