Skip to content

Commit 7fef56f

Browse files
committed
fix: fix cannot have two HTML5 backends at the same time.
react-dnd/react-dnd#3257 (comment)
1 parent 3b7e4ce commit 7fef56f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { DndProvider } from 'react-dnd';
2-
import { FC, PropsWithChildren, useEffect, useState } from 'react';
2+
import { FC, PropsWithChildren } from 'react';
33
import { HTML5Backend } from 'react-dnd-html5-backend';
44
import { Tabs } from './Tabs';
55
import { Provider } from './store';
@@ -23,7 +23,7 @@ const TabContainer: FC<PropsWithChildren<TabsProps>> = ({ activeKey, onTabClick,
2323
const tabDrop = useEventCallback(onTabDrop!);
2424

2525
return (
26-
<DndProvider backend={HTML5Backend}>
26+
<DndProvider backend={HTML5Backend} context={window}>
2727
<Provider init={{ data: [], activeKey, onTabClick: tabClick, onTabDrop: tabDrop }}>
2828
<Tabs {...props} activeKey={activeKey} />
2929
</Provider>

0 commit comments

Comments
 (0)