filemanager icon indicating copy to clipboard operation
filemanager copied to clipboard

Cannot have two HTML5 backends at the same time.

Open RinatRezyapov opened this issue 6 years ago • 5 comments

Hi,

If I have dnd in some parent component and import react-filemanager, I get an error: Uncaught (in promise) Error: Cannot have two HTML5 backends at the same time.

Is it possible to create two exports of filemanager: with dragDropManager and without?

Related to issue: https://github.com/react-dnd/react-dnd/issues/186

RinatRezyapov avatar Aug 07 '18 10:08 RinatRezyapov

If you want it as soon, as possible, can you make a PR please?

kvolkovich-sc avatar Aug 08 '18 11:08 kvolkovich-sc

Related to this issue:

https://github.com/OpusCapita/filemanager/pull/222

kvolkovich-sc avatar Aug 24 '18 16:08 kvolkovich-sc

Hello, the problem is still there, any idea on how i could fix it ?

Alistorm avatar Oct 12 '18 13:10 Alistorm

@Alistorm, I think you can add check for DragDropContextProvider/HTML5Backend presense in React context here:

https://github.com/OpusCapita/filemanager/blob/1506bed54051788b017a734013fb5054e67f8cc2/packages/client-react/src/client/components/FileManager/FileManager.react.js#L24

And if it already exists, use it. If no, add it in place for FileManager.react.js.

We use FileManager for several internal projects and don't want to break backward compatibility at current time.

kvolkovich-sc avatar Oct 13 '18 10:10 kvolkovich-sc

Thx!

Alistorm avatar Oct 15 '18 09:10 Alistorm