react-beautiful-dnd icon indicating copy to clipboard operation
react-beautiful-dnd copied to clipboard

Force update dimensions of <Droppable> while already dragging

Open alekseykarpenko opened this issue 4 years ago • 1 comments

Description

Hi there! First of all, thanks for such a great library! I'm really in love with it. But still, I have some request that, as I see for now, is not possible to implement.

I've walked though the docs and found the restriction called No dimension changes during a drag (also mentioned in Rules. But maybe there is a way to break this rule without consequences? :))

@alexreardon You spent few months working on dynamically dimensions for internal purposes and also implemented collecting dimensions in async way. So maybe you could give regular users an ability to force updating dimensions when needed?

Im trying to build an unusual flexible UI where I need my <Droppable> columns to be resized on hover (with <Draggable already in the hand). Even when I tried to bury Droppable deep inside parent column with overflow:hidden, there is still a wrong behaviour, while the virtual model isn't updated on dragging.

So having a updateDimenions() on onMouseOver of my column would definitely solve my problem.

How about passing some callback from <Droppable> (e.g. provided.updateDimensions()) or somehow from <DragDropContext> that will do that magic?

My example gif (1 Mb)

Kapture 2020-06-23 at 2 20 42 In this example, my first column has correct behavior, as it's dimensions are still, but 2-4th columns behaves wrong as they where resized while dragging.

I will appreciate for your reply.

alekseykarpenko avatar Jun 22 '20 23:06 alekseykarpenko

Transform element on drag is causing this issue, any fix for this?

ahmedmukhtar1133 avatar Mar 04 '24 07:03 ahmedmukhtar1133