An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: Improve database table view row/col drag and drop sorting https://github.com/siyuan-note/siyuan/issues/11048
Daniele2ea9eba4558
diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.goindex 551719b2c3..940e9629ac 100644--- a/kernel/model/attribute_view.go+++ b/kernel/model/attribute_view.go@@ -2624,18 +2624,18 @@ func (tx *Transaction) doSortAttrViewRow(operation *Operation) (ret *TxErr) {}func sortAttributeViewRow(operation *Operation) (err error) {- attrView, err := av.ParseAttributeView(operation.AvID)- if nil != err {+ if operation.ID == operation.PreviousID {+ // 拖拽到自己的下方,不做任何操作 https://github.com/siyuan-note/siyuan/issues/11048return}- view, err := getAttrViewViewByBlockID(attrView, operation.BlockID)+ attrView, err := av.ParseAttributeView(operation.AvID)if nil != err {return}- if operation.ID == operation.PreviousID {- // 拖拽到自己的下方,不做任何操作 https://github.com/siyuan-note/siyuan/issues/11048+ view, err := getAttrViewViewByBlockID(attrView, operation.BlockID)+ if nil != err {return}@@ -2679,6 +2679,11 @@ func (tx *Transaction) doSortAttrViewColumn(operation *Operation) (ret *TxErr) {}func SortAttributeViewKey(avID, blockID, keyID, previousKeyID string) (err error) {+ if keyID == previousKeyID {+ // 拖拽到自己的右侧,不做任何操作 https://github.com/siyuan-note/siyuan/issues/11048+ return+ }+attrView, err := av.ParseAttributeView(avID)if nil != err {return@@ -3146,12 +3151,12 @@ func UpdateAttributeViewCell(tx *Transaction, avID, keyID, rowID, cellID string,// 将游离行绑定到新建的块上bindBlockAv(tx, avID, rowID)}- } else { // 之前绑定了块+ } else { // 之前绑定了块if isUpdatingBlockKey { // 正在更新主键if val.IsDetached { // 现在是游离行// 将绑定的块从属性视图中移除unbindBlockAv(tx, avID, rowID)- } else { // 现在绑定了块+ } else { // 现在绑定了块if oldBoundBlockID != val.BlockID { // 之前绑定的块和现在绑定的块不一样// 换绑块unbindBlockAv(tx, avID, oldBoundBlockID)