Skip to content

Commit

Permalink
🎨 Database table view supports inserting columns in the middle #9993
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Dec 29, 2023
1 parent 3791925 commit 1448827
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions kernel/model/attribute_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -1923,6 +1923,11 @@ func addAttributeViewColumn(operation *Operation) (err error) {
for _, view := range attrView.Views {
switch view.LayoutType {
case av.LayoutTypeTable:
if "" == operation.PreviousID {
view.Table.Columns = append([]*av.ViewTableColumn{{ID: key.ID}}, view.Table.Columns...)
break
}

added := false
for i, column := range view.Table.Columns {
if column.ID == operation.PreviousID {
Expand Down

0 comments on commit 1448827

Please sign in to comment.