From d97d8108d23a2248705bff637f8f2b2e10120dec Mon Sep 17 00:00:00 2001 From: Philipinho <16838612+Philipinho@users.noreply.github.com> Date: Sun, 24 May 2026 15:38:34 +0100 Subject: [PATCH] feat(bases): drop cards onto empty kanban columns / below last card --- .../components/views/kanban/kanban-column.tsx | 13 ++++- .../base/hooks/use-kanban-column-drop.ts | 48 +++++++++++++++++++ .../features/base/styles/kanban.module.css | 4 ++ 3 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 apps/client/src/features/base/hooks/use-kanban-column-drop.ts diff --git a/apps/client/src/features/base/components/views/kanban/kanban-column.tsx b/apps/client/src/features/base/components/views/kanban/kanban-column.tsx index 4459d20d0..1c8b28da9 100644 --- a/apps/client/src/features/base/components/views/kanban/kanban-column.tsx +++ b/apps/client/src/features/base/components/views/kanban/kanban-column.tsx @@ -4,6 +4,7 @@ import { KanbanCard } from "./kanban-card"; import { KanbanColumnHeader } from "./kanban-column-header"; import { KanbanAddCardButton } from "./kanban-add-card-button"; import type { CardDropPayload } from "@/features/base/hooks/use-kanban-card-drag"; +import { useKanbanColumnDrop } from "@/features/base/hooks/use-kanban-column-drop"; import classes from "@/features/base/styles/kanban.module.css"; type KanbanColumnProps = { @@ -21,6 +22,11 @@ export function KanbanColumn({ onAddCard, onCardDrop, }: KanbanColumnProps) { + const { ref: bodyRef, isOver } = useKanbanColumnDrop({ + columnKey: column.key, + onDrop: onCardDrop, + }); + return (