Skip to content

fix(kanban): prevent drag errors after creating tasks by enforcing enum and id prefixes (#180)#187

Open
tuzixiangs wants to merge 1 commit intod3george:mainfrom
tuzixiangs:fix/kanban-task-drag
Open

fix(kanban): prevent drag errors after creating tasks by enforcing enum and id prefixes (#180)#187
tuzixiangs wants to merge 1 commit intod3george:mainfrom
tuzixiangs:fix/kanban-task-drag

Conversation

@tuzixiangs
Copy link

问题

  • 看板中使用 createTask 创建新任务后,进行拖拽会报错(见 #180

原因

  • 拖拽类型通过 id 前缀推断(task-/column-),新增数据在不同调用点存在前缀不一致或遗漏,导致 activeType 误判

修改

  • 新增枚举 DndItemType,替代 "column" | "task" 字符串判断
  • 在 createTask / createColumn 内部做 id 前缀校验与补齐,保证拖拽类型的判定可靠
  • 更新拖拽开始(handleDragStart)与 DragOverlay 的类型判断为使用枚举

关联

@vercel
Copy link

vercel bot commented Nov 16, 2025

@tuzixiangs is attempting to deploy a commit to the d3george's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

看板Kanban 有bug

1 participant