Closed Passhub closed 3 years ago
I believe that this is covered in the example referred from the documentation of React beautiful dnd. Did you check that?
I believe that this is covered in the example referred from the documentation of React beautiful dnd. Did you check that?
Love u Didn't see the available scenario Thank u so much!
Hi there! I was working with react-beautiful-dnd and virtuoso and dynamic list items height and i've got a problem. When I'm trying to use draggable component of dnd inside virtuoso it's getting Uncaught Error: Zero-sized element, this should not happen.
To my mind, the reason is when item in list is dragging, it changes the position to "fixed" and then it causes the virtuoso lib recalculate the "data-known-size" of item to "0", because the current height of virtuoso item wrapper div is becoming "0" too. (I'm not sure if it's correct, but hope it can can help someone).
To Reproduce
Expected behavior Ofcoz do not have this problem) Maybe it's possible to have a prop like "isItemDraggable" or something like that to handle when item is dragging and keep data-know-size unchanged!?
Screenshots
Additional context The only working implementation is to set height or min-height directly to virtuoso item wrapper div, but it's the worst idea when list item height can be dynamic. Also as i understand we can use defaultItemHeight or fixedItemHeight virtuoso props, but it's still incompatible with dynamic height. And i don't want to use something like ref to get the current list item height and set it directly before dragging to all list items.
P.S. Will be very thankful for and help or advise)