I want to drag an item from a container A to a container B. In my context the same item has a different size and style when it's in container B as opposed to container A.
I found an approach to do this but the issue is that the transforms on the items in container B to make room for the item while dragging are calculated based on the initial size in container B. Is there any way to achieve what I am trying to do?
...
const isDraggingOverContainerB = snapshots.draggingOver === 'containerB';
const size = isDraggingOverContainerB ? 20 : 100;
return (
<DraggableItem
{ ...provided.draggableProps }
{ ...provided.dragHandleProps }
ref={ provided.innerRef }
className={ 'drag-box' }
style={{
...provided.draggableProps.style,
width: size,
height: size,
}}
/>
)
