Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix: CSV drag and drop (#42656)

Vaibhav997d2c365ad3
diff --git a/apps/studio/components/grid/components/grid/Grid.tsx b/apps/studio/components/grid/components/grid/Grid.tsx
index 1159273f204..d57ac84322e 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(
<div
className={cn('flex flex-col relative transition-colors', containerClass)}
style={{ width: width || '100%', height: height || '50vh' }}
+ onDragOver={onDragOver}
+ onDragLeave={onDragOver}
+ onDrop={onFileDrop}
>
{/* Render no rows fallback outside of the DataGrid */}
{(rows ?? []).length === 0 && (
@@ -241,9 +244,6 @@ export const Grid = memo(
isTableEmpty && isDraggedOver && 'border-2 border-dashed',
isValidFileDraggedOver ? 'border-brand-600' : 'border-destructive-600'
)}
- onDragOver={onDragOver}
- onDragLeave={onDragOver}
- onDrop={onFileDrop}
>
{isLoading && !isDisabled && (
<GenericSkeletonLoader className="w-full top-9 absolute p-2" />