mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
🎨 Improve database table view
This commit is contained in:
@@ -1670,6 +1670,7 @@ func replaceAttributeViewBlock(operation *Operation, tx *Transaction) (err error
|
||||
}
|
||||
}
|
||||
|
||||
replacedRowID := false
|
||||
for _, v := range attrView.Views {
|
||||
switch v.LayoutType {
|
||||
case av.LayoutTypeTable:
|
||||
@@ -1682,8 +1683,14 @@ func replaceAttributeViewBlock(operation *Operation, tx *Transaction) (err error
|
||||
for i, rowID := range v.Table.RowIDs {
|
||||
if rowID == operation.PreviousID {
|
||||
v.Table.RowIDs[i] = operation.NextID
|
||||
replacedRowID = true
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if !replacedRowID {
|
||||
v.Table.RowIDs = append(v.Table.RowIDs, operation.NextID)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user