-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SortableListView inside ScrollView #23
Comments
onRowMoved is not being triggered |
Related to this #1046 |
Hey @superandrew213, do you have an example of how to reproduce this? |
@deanmcpherson I changed my approach and am not using the parent ScrollView anymore but it was basically like this:
|
Hey @superandrew213, I don't think this is possible. I think you would need to disable the scroll of the scroll view for the sortable to be able to capture the move responder. You could try adding onMoveShouldSetPanResponder={true} to the PanResponder, but my suspicion is that on moving the parent scrollview will capture the event regardless. |
@deanmcpherson I found a workaround by disabling the parent ScrollView onPanResponderGrant then enable onPanResponderRelease |
Just out of curiosity, why are you nesting it inside a ScrollView? |
My sortable list will only have 4 items and I have other content underneath it. |
Ah ok, and you need it all to scroll. The content below is pretty big? Otherwise you could just render it in renderFooter. |
Yeah it's quite big and includes other non sortable lists. I might try and see how it performs if I include it in renderFooter. It might rerender every time SortableListView updates |
Yep, by default it will try and rerender every time the SortableListView updates, you can wrap it in a StaticRenderer or return false to shouldComponentUpdate to fix that though. |
Closing issue. |
Found rendering elements in the header an footer very useful when wanting all content to scroll with the list and not trigger the drag. Thanks @deanmcpherson |
Is the there a way to get this to work? Currently it does not allow sorting. You can select the cell but it doesn't move. Just scrolls the parent ScrollView instead.
The text was updated successfully, but these errors were encountered: