Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Oct 9, 2023
2 parents 803069d + 9028491 commit 4965b7b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions kernel/model/attribute_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,23 @@ func RenderAttributeView(avID string) (viewable av.Viewable, attrView *av.Attrib

switch view.LayoutType {
case av.LayoutTypeTable:
// 列删除以后需要删除设置的过滤和排序
tmpFilters := []*av.ViewFilter{}
for _, f := range view.Table.Filters {
if k, _ := attrView.GetKey(f.Column); nil != k {
tmpFilters = append(tmpFilters, f)
}
}
view.Table.Filters = tmpFilters

tmpSorts := []*av.ViewSort{}
for _, s := range view.Table.Sorts {
if k, _ := attrView.GetKey(s.Column); nil != k {
tmpSorts = append(tmpSorts, s)
}
}
view.Table.Sorts = tmpSorts

viewable, err = renderAttributeViewTable(attrView, view)
}

Expand Down

0 comments on commit 4965b7b

Please sign in to comment.