Skip to content

Commit 7bd9cdd

Browse files
committed
fix: When dragging a selected curation, move all selected to the new group
1 parent 9f33bcc commit 7bd9cdd

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

src/renderer/components/CuratePageLeftSidebar.tsx

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,20 @@ function CuratePageLeftSidebarComponent(props: CuratePageLeftSidebarComponentPro
117117

118118
const onCurationDragDrop = () => {
119119
if (draggedCuration !== '' && dragGroupTarget !== undefined) {
120-
dispatch(curateActions.changeGroup({
121-
folder: draggedCuration,
122-
group: dragGroupTarget
123-
}));
120+
if (curate.selected.includes(draggedCuration)) {
121+
for (const folder of curate.selected) {
122+
dispatch(curateActions.changeGroup({
123+
folder: folder,
124+
group: dragGroupTarget
125+
}));
126+
}
127+
} else {
128+
dispatch(curateActions.changeGroup({
129+
folder: draggedCuration,
130+
group: dragGroupTarget
131+
}));
132+
}
133+
124134
}
125135
setDraggedCuration('');
126136
setDragGroupTarget(undefined);

0 commit comments

Comments
 (0)