feat: raw statuses dnd

This commit is contained in:
2025-08-01 17:50:27 +04:00
parent 943b2d63f5
commit 586af488da
3 changed files with 175 additions and 33 deletions

View File

@ -14,13 +14,15 @@ type BoardSectionProps = {
id: string;
title: string;
deals: DealSchema[];
isDragging?: boolean;
};
const StatusColumn = ({ id, title, deals }: BoardSectionProps) => {
const StatusColumn = ({ id, title, deals, isDragging }: BoardSectionProps) => {
const { setNodeRef } = useDroppable({ id });
const sortedDeals = useMemo(() => sortByLexorank(deals), [deals]);
console.log("rerender");
return (
<Box
style={{
@ -29,7 +31,14 @@ const StatusColumn = ({ id, title, deals }: BoardSectionProps) => {
width: "15vw",
minWidth: 150,
}}>
<Text>{title}</Text>
<Text
style={{
cursor: "grab",
userSelect: "none",
opacity: isDragging ? 0.5 : 1,
}}>
{title}
</Text>
<SortableContext
id={id}
items={sortedDeals}