🐛 Database filtering does not work after change the field type https://github.com/siyuan-note/siyuan/issues/10519

This commit is contained in:
Daniel 2024-03-06 23:12:01 +08:00
parent d97105e970
commit fed412cc2f
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 28 additions and 0 deletions

View file

@ -695,6 +695,19 @@ func renderAttributeView(attrView *av.AttributeView, viewID string, page, pageSi
}
}
// 补全过滤器 Value
if nil != view.Table {
for _, f := range view.Table.Filters {
if nil != f.Value {
continue
}
if k, _ := attrView.GetKey(f.Column); nil != k {
f.Value = &av.Value{Type: k.Type}
}
}
}
switch view.LayoutType {
case av.LayoutTypeTable:
// 列删除以后需要删除设置的过滤和排序