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

How to show drop-able area

Open vivekmpuh opened this issue 7 years ago • 3 comments

Hi

I have been using this plugin for item sorting this is really great, I wanted to show the drop zone area, like a border round the area where i want to drop the element / item.

Thanks

vivekmpuh avatar Jul 11 '19 10:07 vivekmpuh

There is a function called updateBeforeSortStart where you can set local state with styling that shows border on droppable area. Example: https://codesandbox.io/s/pedantic-kare-qrn19

knarkunas avatar Jul 25 '19 03:07 knarkunas

@knarkunas How do you show the area for where the item will be placed. Similar to your codesandbox but not around the entire list, just the 1 item

joelgb2194 avatar Oct 26 '19 13:10 joelgb2194

@joelgb2194 it already shows drop area by keeping empty space for it. No custom one can be implemented without actually changing package code as this is applied via style and transform: Screenshot 2019-10-28 at 05 56 51

knarkunas avatar Oct 28 '19 03:10 knarkunas