We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a4b3159 + 8389a20 commit f41961bCopy full SHA for f41961b
src/components/text-column-field/drag-drop-context.tsx
@@ -1,17 +1,14 @@
1
import * as React from 'react';
2
-import { DndProvider, createDndContext } from 'react-dnd';
+import { DndProvider } from 'react-dnd';
3
import HTML5Backend from 'react-dnd-html5-backend';
4
5
-const dndContext = createDndContext(HTML5Backend);
6
-
7
const withDragDropContext =
8
<TProps extends {}>(
9
Component: React.ComponentClass<TProps> | React.FC<TProps>,
10
) =>
11
(props: TProps) => {
12
- const manager = React.useRef(dndContext);
13
return (
14
- <DndProvider manager={manager.current.dragDropManager}>
+ <DndProvider backend={HTML5Backend} context={window}>
15
<Component {...props} />
16
</DndProvider>
17
);
0 commit comments