From 997d2c365ad3ca26d78a1c78a27c48b10c76ec8e Mon Sep 17 00:00:00 2001 From: Vaibhav <117663341+7ttp@users.noreply.github.com> Date: Tue, 10 Feb 2026 23:04:35 +0530 Subject: [PATCH 1/4] fix: CSV drag and drop (#42656) ## Problem Drag-and-drop CSV import functionality is broken in the Table Editor when tables are empty. The `pointer-events-none` CSS class on the empty state overlay blocks all pointer events, including drag events, preventing users from dropping CSV files onto empty tables. ## Solution Move drag event handlers (`onDragOver`, `onDragLeave`, `onDrop`) from the inner overlay div to the parent container div. This allows: - Drag events to be captured by the parent container - The overlay to retain `pointer-events-none` for proper horizontal scrolling - (as intended in #42618) - Interactive elements inside to use `pointer-events-auto` This follows the existing pattern used in `FileExplorerColumn.tsx` where drag handlers are on the parent container while visual overlays have `pointer-events-none`. ## Related - Closes https://github.com/supabase/supabase/issues/42655 - Extends https://github.com/supabase/supabase/pull/42618 ## Summary by CodeRabbit * **Bug Fixes** * Improved drag-and-drop event detection scope in the grid component. --- apps/studio/components/grid/components/grid/Grid.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/studio/components/grid/components/grid/Grid.tsx b/apps/studio/components/grid/components/grid/Grid.tsx index 1159273f2049e..d57ac84322e40 100644 --- a/apps/studio/components/grid/components/grid/Grid.tsx +++ b/apps/studio/components/grid/components/grid/Grid.tsx @@ -232,6 +232,9 @@ export const Grid = memo(