bevacqua / dragula

:ok_hand: Drag and drop so simple it hurts
https://bevacqua.github.io/dragula/
MIT License
22.01k stars 1.97k forks source link

Delay redraw until drop. #703

Open sakoht opened 1 year ago

sakoht commented 1 year ago

I’m using drag and drop for both rows and columns in a large “heatmap” presented as an html table for a scientific application. The animation of the drag makes everything slow and jerky as the table redraws too much.

I’d like to have it, when dragging:

Then actually move the element only after drop has occurred.

Is this possible with dragula?

Note: When dragging the table columns I am just dragging the headers I have custom drip code redraw the tbody, but the browser slightly changes the whole column during the drag as the headers move around, so it would benefit from the same “delayed visual drop” as the rows.

sakoht commented 1 year ago

It seems like I can change the behavior of the spruce element just by changing the css.

Preventing it from showing the element as inserted mid-drag is likely turning off one of the fancier features. Which is quite slick but too intensive for this use case of a mega table.

Hoping this is just a novel use case I don’t see in the docs, and not a full feature request!