瀏覽代碼

:art: Add multi-select type column to Attribute View https://github.com/siyuan-note/siyuan/issues/8695

Daniel 2 年之前
父節點
當前提交
96e7044baf
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      kernel/model/attribute_view.go

+ 4 - 4
kernel/model/attribute_view.go

@@ -396,20 +396,20 @@ func removeAttributeViewColumnOption(operation *Operation) (err error) {
 
 		colIndex = i
 
-		for _, opt := range col.Options {
+		for j, opt := range col.Options {
 			if opt.Name != optName {
 				continue
 			}
 
-			col.Options = append(col.Options[:i], col.Options[i+1:]...)
+			col.Options = append(col.Options[:j], col.Options[j+1:]...)
 			break
 		}
 		break
 	}
 
 	for _, row := range attrView.Rows {
-		for k, cell := range row.Cells {
-			if colIndex != k {
+		for i, cell := range row.Cells {
+			if colIndex != i {
 				continue
 			}