Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.

Commit 84d8f7c

Browse files
committed
comeback to provider
1 parent a1e91df commit 84d8f7c

File tree

2 files changed

+9
-14
lines changed

2 files changed

+9
-14
lines changed

src/components/Table.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ import TableHeader from "components/TableHeader";
3838
import CustomTemplateSelectorStyles from "components/styles/RowTemplateStyles";
3939
import Select, { OnChangeValue } from "react-select";
4040
import { DndProvider } from "react-dnd";
41+
import { HTML5Backend } from "react-dnd-html5-backend";
4142
import TableCell from "components/TableCell";
4243
import getInitialColumnSizing from "components/behavior/InitialColumnSizeRecord";
4344
import { globalDatabaseFilterFn } from "components/reducers/TableFilterFlavours";
44-
import { DnDTableManager } from "helpers/DragAndDropHelper";
4545

4646
const defaultColumn: Partial<ColumnDef<RowDataType>> = {
4747
minSize: DatabaseLimits.MIN_COLUMN_HEIGHT,
@@ -318,10 +318,14 @@ export function Table(tableData: TableDataType) {
318318
{/* TODO manage context with documentFragment in any way to fix DnD conflict with Obsidian */}
319319
<DndProvider
320320
key={`${headerGroup.id}-${headerGroupIndex}-dnd-provider`}
321-
manager={DnDTableManager(
322-
globalConfig.enable_debug_mode,
323-
globalConfig.enable_dnd ? activeDocument : null
324-
)}
321+
debugMode={globalConfig.enable_debug_mode}
322+
backend={HTML5Backend}
323+
context={
324+
(globalConfig.enable_debug_mode,
325+
globalConfig.enable_dnd
326+
? activeWindow
327+
: activeDocument.createElement("div"))
328+
}
325329
>
326330
{headerGroup.headers
327331
.filter(

src/helpers/DragAndDropHelper.ts

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)