Skip to content

Commit 3637d8d

Browse files
committed
fix #6363 -- jupyter drag-n-drop cells: support selecting multiple cells
1 parent e042a78 commit 3637d8d

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/packages/frontend/frame-editors/jupyter-editor/cell-notebook/actions.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,3 +1096,4 @@ export class NotebookFrameActions {
10961096
this.jupyter_actions.syncdb.commit();
10971097
};
10981098
}
1099+

src/packages/frontend/jupyter/cell-list.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,8 @@ export const CellList: React.FC<CellListProps> = (props: CellListProps) => {
742742
frameActions.current?.set_cur_id(id);
743743
}}
744744
onDragStop={(oldIndex, newIndex) => {
745-
actions?.moveCell(oldIndex, newIndex);
745+
const delta = newIndex - oldIndex;
746+
frameActions.current?.move_selected_cells(delta);
746747
setTimeout(() => {
747748
frameActions.current?.scroll("cell visible");
748749
}, 0);

0 commit comments

Comments
 (0)