Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Improve database table view row drag and drop sorting https://github.com/siyuan-note/siyuan/issues/11048

Daniela5976172d4ec
diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go
index ce40460710..b026a230c3 100644
--- a/kernel/model/attribute_view.go
+++ b/kernel/model/attribute_view.go
@@ -2614,6 +2614,11 @@ func sortAttributeViewRow(operation *Operation) (err error) {
return
}
+ if operation.ID == operation.PreviousID {
+ // 拖拽到自己的下方,不做任何操作 https://github.com/siyuan-note/siyuan/issues/11048
+ return
+ }
+
var rowID string
var index, previousIndex int
for i, r := range view.Table.RowIDs {