🎨 Improve database table view
This commit is contained in:
parent
6c462dbc4a
commit
05bf460d5d
1 changed files with 7 additions and 0 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue