🎨 Keep the width when duplicating database table view field https://github.com/siyuan-note/siyuan/issues/11552
This commit is contained in:
parent
cb41abb7bd
commit
22c94e9a68
1 changed files with 11 additions and 0 deletions
|
@ -59,7 +59,18 @@ func RenderAttributeViewTable(attrView *av.AttributeView, view *av.View, query s
|
|||
for _, col := range view.Table.Columns {
|
||||
key, getErr := attrView.GetKey(col.ID)
|
||||
if nil != getErr {
|
||||
switch view.LayoutType {
|
||||
case av.LayoutTypeTable:
|
||||
for i, column := range view.Table.Columns {
|
||||
if column.ID == col.ID {
|
||||
view.Table.Columns = append(view.Table.Columns[:i], view.Table.Columns[i+1:]...)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
logging.LogWarnf("get key [%s] failed: %s", col.ID, getErr)
|
||||
av.SaveAttributeView(attrView)
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue