🎨 Improve adding rows of the filtered database table view https://github.com/siyuan-note/siyuan/issues/10025

This commit is contained in:
Daniel 2023-12-30 17:13:53 +08:00
parent 76dd5a2d28
commit 456feff45a
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 12 additions and 4 deletions

View file

@ -1520,6 +1520,7 @@ func addAttributeViewBlock(blockID string, operation *Operation, tree *parse.Tre
newValue.IsDetached = operation.IsDetached
values, _ := attrView.GetKeyValues(filter.Column)
values.Values = append(values.Values, newValue)
break
}
}
}
@ -1533,10 +1534,11 @@ func addAttributeViewBlock(blockID string, operation *Operation, tree *parse.Tre
if keyValues.Key.ID == filter.Column {
newValue := filter.GetAffectValue(keyValues.Key)
newValue.ID = ast.NewNodeID()
newValue.KeyID = keyValues.Key.ID
newValue.BlockID = blockID
newValue.IsDetached = operation.IsDetached
values, _ := attrView.GetKeyValues(filter.Column)
values.Values = append(values.Values, newValue)
keyValues.Values = append(keyValues.Values, newValue)
break
}
}
}