mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-18 15:40:12 +01:00
🎨 Improve database attribute panel number field formating https://github.com/siyuan-note/siyuan/issues/12491
This commit is contained in:
parent
539c96a587
commit
76b26d4502
1 changed files with 7 additions and 4 deletions
|
|
@ -3047,11 +3047,14 @@ func UpdateAttributeViewCell(tx *Transaction, avID, keyID, rowID, cellID string,
|
||||||
key, _ := attrView.GetKey(keyID)
|
key, _ := attrView.GetKey(keyID)
|
||||||
|
|
||||||
if av.KeyTypeNumber == val.Type {
|
if av.KeyTypeNumber == val.Type {
|
||||||
if nil != val.Number && !val.Number.IsNotEmpty {
|
if nil != val.Number {
|
||||||
|
if !val.Number.IsNotEmpty {
|
||||||
val.Number.Content = 0
|
val.Number.Content = 0
|
||||||
val.Number.FormattedContent = ""
|
val.Number.FormattedContent = ""
|
||||||
}
|
} else {
|
||||||
val.Number.FormatNumber()
|
val.Number.FormatNumber()
|
||||||
|
}
|
||||||
|
}
|
||||||
} else if av.KeyTypeDate == val.Type {
|
} else if av.KeyTypeDate == val.Type {
|
||||||
if nil != val.Date && !val.Date.IsNotEmpty {
|
if nil != val.Date && !val.Date.IsNotEmpty {
|
||||||
val.Date.Content = 0
|
val.Date.Content = 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue