atlassian / react-beautiful-dnd

Beautiful and accessible drag and drop for lists with React
https://react-beautiful-dnd.netlify.app
Other
33.23k stars 2.53k forks source link

isDraggingOver doesn't work for Droppables with isDropDisabled set to true. #1651

Closed rajats920 closed 4 years ago

rajats920 commented 4 years ago

Expected behavior

The isDraggingOver flag should be true for a Droppable if a Draggable component is being dragged over it.

Actual behavior

isDraggingOver flag remains false.

Steps to reproduce

Set a Droppable with isDropDisabled flag as true. Check isDraggingOver flag while dragging a Draggable component over it.

Suggested solution?

NA

What version of React are you using?

16.9.0

What version of react-beautiful-dnd are you running?

11.0.5

What browser are you using?

Google Chrome

Demo

https://codesandbox.io/s/vertical-list-gd5ly

alexreardon commented 4 years ago

When a Droppable is disabled it is ignored

alexreardon commented 4 years ago

We excluded disabled items from our collision engine.

I think it would be strange to be 'over' a list that is disabled. It would then mean we would need to allow a user to be over a list, but that items wouldn't move out of the way. What would we do if the user dropped on the list?

rajats920 commented 4 years ago

@alexreardon What we needed was to change the style of the disabled droppable component when a draggable is dragging over it, i.e. a style to show that dropping is disabled. But looks like this is not possible. Do you know of any workaround that I can use for this?