Skip to content

Commit

Permalink
feat: 드래그 중 해당 요소가 삭제되면 수정 줄이 없어지도록 함
Browse files Browse the repository at this point in the history
  • Loading branch information
surinkwon committed Aug 31, 2024
1 parent 865276b commit bb57972
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const NumberInputColumn = ({
);
}

return <span className="w-full text-right">{value}</span>;
return <span className="w-full text-right truncate">{value}</span>;
};

export default NumberInputColumn;
23 changes: 23 additions & 0 deletions frontend/src/pages/backlog/EpicPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -335,12 +335,35 @@ const EpicPage = () => {
action,
content,
}: BacklogSocketData) => {
if (
domain === "epic" &&
action === "delete" &&
content.id === draggingEpicId
) {
setEpicElementIndex(undefined);
return;
}

if (
domain === "story" &&
action === "delete" &&
content.id === draggingStoryId
) {
setStoryElementIndex({ epicId: undefined, storyIndex: undefined });

return;
}

if (
domain === "task" &&
action === "delete" &&
content.id === draggingTaskId
) {
setTaskElementIndex({
epicId: undefined,
storyId: undefined,
taskIndex: undefined,
});
}
};

Expand Down
9 changes: 9 additions & 0 deletions frontend/src/pages/backlog/UnfinishedStoryPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,15 @@ const UnfinishedStoryPage = () => {
content.id === draggingStoryId
) {
setStoryElementIndex(undefined);
return;
}

if (
domain === "task" &&
action === "delete" &&
content.id === draggingTaskId
) {
setTaskElementIndex({ storyId: undefined, taskIndex: undefined });
}
};

Expand Down

0 comments on commit bb57972

Please sign in to comment.