react-sortable-hoc icon indicating copy to clipboard operation
react-sortable-hoc copied to clipboard

Conflict with react-dropzone

Open iamacatperson opened this issue 4 years ago • 3 comments

I realise that when I use react-sortable-hoc and I also have react-dropzone on the same page, the sorting doesn't work well (e.g. I cannot drag an item in between other items, I can only drag an item to the very top or to the bottom).

I guess the drag event is being triggered for both which is causing this hiccup. Is there a way to prevent this conflict?

iamacatperson avatar May 20 '20 08:05 iamacatperson

Any update on this issue?

darron1217 avatar Oct 28 '20 07:10 darron1217

Hello @iamacatperson @darron1217 It's possible to integrate adding the component <List elements ..../> inside <Dropzone ...>

<div {...getRootProps()}>
   <input {...getInputProps()}/>
   <List elements={data.fileList} .../>
</div>

Cheers!

JuanLuisGarciaBorrego avatar Nov 30 '20 11:11 JuanLuisGarciaBorrego

I'm having the same problem, here's a video of how react-sortable-hoc behaves when dropzone is on the same page:

https://user-images.githubusercontent.com/2058016/103432353-25bfa080-4ba3-11eb-845f-e6e1d8ae419a.mov

I'm not sure if this is a bug with react-dropzone, or with react-sortable-hoc, or if maybe the browser just can't handle both reading events?

elmehalawi avatar Jan 01 '21 02:01 elmehalawi