Skip to content

Commit bb57972

Browse files
committed
feat: 드래그 중 해당 요소가 삭제되면 수정 줄이 없어지도록 함
1 parent 865276b commit bb57972

File tree

3 files changed

+33
-1
lines changed

3 files changed

+33
-1
lines changed

frontend/src/components/backlog/common/NumberInputColumn.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const NumberInputColumn = ({
2323
);
2424
}
2525

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

2929
export default NumberInputColumn;

frontend/src/pages/backlog/EpicPage.tsx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,12 +335,35 @@ const EpicPage = () => {
335335
action,
336336
content,
337337
}: BacklogSocketData) => {
338+
if (
339+
domain === "epic" &&
340+
action === "delete" &&
341+
content.id === draggingEpicId
342+
) {
343+
setEpicElementIndex(undefined);
344+
return;
345+
}
346+
338347
if (
339348
domain === "story" &&
340349
action === "delete" &&
341350
content.id === draggingStoryId
342351
) {
343352
setStoryElementIndex({ epicId: undefined, storyIndex: undefined });
353+
354+
return;
355+
}
356+
357+
if (
358+
domain === "task" &&
359+
action === "delete" &&
360+
content.id === draggingTaskId
361+
) {
362+
setTaskElementIndex({
363+
epicId: undefined,
364+
storyId: undefined,
365+
taskIndex: undefined,
366+
});
344367
}
345368
};
346369

frontend/src/pages/backlog/UnfinishedStoryPage.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,15 @@ const UnfinishedStoryPage = () => {
168168
content.id === draggingStoryId
169169
) {
170170
setStoryElementIndex(undefined);
171+
return;
172+
}
173+
174+
if (
175+
domain === "task" &&
176+
action === "delete" &&
177+
content.id === draggingTaskId
178+
) {
179+
setTaskElementIndex({ storyId: undefined, taskIndex: undefined });
171180
}
172181
};
173182

0 commit comments

Comments
 (0)