This repository was archived by the owner on Jul 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed
Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,7 @@ export function Table(tableData: TableDataType) {
9191 ) ;
9292 const [ persistSizingTimeout , setPersistSizingTimeout ] = React . useState ( null ) ;
9393 // Drag and drop
94+ const DnDRef = React . useRef ( null ) ;
9495 const [ columnOrder , setColumnOrder ] = React . useState < ColumnOrderState > (
9596 columns . map ( ( c ) => c . id )
9697 ) ;
@@ -315,10 +316,13 @@ export function Table(tableData: TableDataType) {
315316 < div
316317 key = { `${ headerGroup . id } -${ headerGroupIndex } ` }
317318 className = { `${ c ( "tr header-group" ) } ` }
319+ ref = { DnDRef }
318320 >
319321 < DndProvider
320322 key = { `${ headerGroup . id } -${ headerGroupIndex } -dnd-provider` }
321323 backend = { HTML5Backend }
324+ debugMode = { global . enable_debug_mode }
325+ context = { DnDRef }
322326 >
323327 { headerGroup . headers
324328 . filter (
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ export default function TableHeader(headerProps: TableHeaderProps) {
3535 view . diskConfig . reorderColumns ( newColumnOrder ) ;
3636 }
3737
38- const [ { isDragging, handlerId } , drag ] = useDrag (
38+ const [ { isDragging, handlerId } , drag , dragPreview ] = useDrag (
3939 ( ) => ( {
4040 type : DnDConfiguration . DRAG_TYPE ,
4141 item : { id, originalIndex } ,
Original file line number Diff line number Diff line change @@ -218,7 +218,7 @@ export const CellSizeOptions = Object.freeze({
218218} )
219219
220220export const DnDConfiguration = Object . freeze ( {
221- DRAG_TYPE : "column " ,
221+ DRAG_TYPE : "dbFolderColumn " ,
222222} ) ;
223223
224224export const ResizeConfiguration = Object . freeze ( {
You can’t perform that action at this time.
0 commit comments