Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

Merge current reorder board into filtered drag handling

Tin06804ab32760
diff --cc apps/web/src/components/kanban-board/index.tsx
index be6eb6baf,851683bfb..082ac8ba3
--- a/apps/web/src/components/kanban-board/index.tsx
+++ b/apps/web/src/components/kanban-board/index.tsx
@@@ -188,11 -189,13 +189,14 @@@ function KanbanBoard(
const overId = over.id.toString();
if (isReordering) return;
- const canonical =
- queryClient.getQueryData<ProjectWithTasks>(["tasks", project.id]) ??
- (storedProject?.id === project.id ? storedProject : undefined);
+ const canonical = selectReorderBoard(
+ project.id,
+ activeId,
+ queryClient.getQueryData<ProjectWithTasks>(["tasks", project.id]),
+ storedProject,
+ );
if (!canonical) return;
+
const moved = moveBoardTask(canonical, activeId, overId, sortedByNumber);
if (!moved || !moved.tasks.length) return;
setProject(moved.project);