Commit 997d2c3
authored
fix: CSV drag and drop (supabase#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 supabase#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 supabase#42655
- Extends supabase#42618
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Improved drag-and-drop event detection scope in the grid component.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent a0b946f commit 997d2c3
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
235 | 238 | | |
236 | 239 | | |
237 | 240 | | |
| |||
241 | 244 | | |
242 | 245 | | |
243 | 246 | | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
| |||
0 commit comments