rlemaigre / Easy-DnD

A drag and drop implementation for Vue.js 2 and 3 https://codesandbox.io/s/easy-dnd-demo-9mbij https://codesandbox.io/s/easy-dnd-demo-2-xnqbz
MIT License
384 stars 52 forks source link

Pre-Drag-Start event #55

Closed JohnnyAW closed 3 years ago

JohnnyAW commented 4 years ago

Hello, is it somehow possible to update UI right before drag event will start? What I try to do: I have DropList, that has components, that can be collapsed/expanded. I want to collapse my components for better dragging experience. If I update UI using dragstart - event, reordering is wrong, because it uses component sizes before the UI update.

nicholaszuccarelli commented 3 years ago

This is solved with the introduction of the DropList $refs.dropListRef.refresh() method which lets you recompute the grid sizes.

@rlemaigre Might want to close this.