mochixuan/react-native-drag-sort

AnySizeDragSortableView not rendering anything

Opened this issue · 3 comments

Hello. I followed the README trying to setup a drag & droppable list with elements of varied sizes. I could not get this to work. the render item method was called for every item, but nothing was rendered on screen. I have created and linked a minimum reproducible example.

Thanks in advance

https://github.com/GNUGradyn/ReactNativeDragSortMre

Interestingly, it seems like the component is rendered, just invisible
image
image

Been chipping away at this all day. I've got the issue all mapped out but not quite sure what the solution is. In AnySizeDragView, the draggable items are housed in a scroll view. This scroll view has a flex property of 1. This scroll view is housed in a View with no defined height. The result is the scroll view has a height of 0.

Upon further testing, I do not think the scroll view needs to be flex: 1. I'm not sure why this was done - I will simply remove it unless maintainer can justify its existence