Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

fix: dont scroll horizontally when dragging cells (#1976)

Akshay Agrawalc1130e853461
diff --git a/frontend/src/components/sort/SortableCellsProvider.tsx b/frontend/src/components/sort/SortableCellsProvider.tsx
index 57d7b2daf6..5e0291cd94 100644
--- a/frontend/src/components/sort/SortableCellsProvider.tsx
+++ b/frontend/src/components/sort/SortableCellsProvider.tsx
@@ -59,8 +59,12 @@ const SortableCellsProviderInternal = ({
});
});
+ // autoScroll threshold x: 0 is required to disable horizontal scroll
+ // threshold y: 0.1 means scroll y when near bottom/top 10% of
+ // scrollable container
return (
<DndContext
+ autoScroll={{ threshold: { x: 0, y: 0.1 } }}
sensors={sensors}
collisionDetection={closestCenter}
modifiers={[restrictToVerticalAxis]}