atlassian / react-beautiful-dnd

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

Highlight destination zone if droppable Id and index exist onDragUpdate #2491

Closed toyib-storydoc closed 1 year ago

toyib-storydoc commented 1 year ago

Expected behaviour

To highlight only a specific index thats possible to drop a draggable item. i.e set border: 1px dotted red;

draggableId: "item-0", type: "DEFAULT", source: Object, mode: "FLUID", combine: null…} draggableId: "item-0" type: "DEFAULT" source: Object droppableId: "droppable" index: 0 mode: "FLUID" combine: null destination: Object droppableId: "droppable" index: 2

in this case highlight the droppable with index 2

Actual behaviour

I can only highlight all droppable zone

toyib-storydoc commented 1 year ago

I figured it out.