-
Notifications
You must be signed in to change notification settings - Fork 279
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
Sorting not working in Android #188
Comments
Also running into this on Android. Seems to be working fine on iOS for me. Overall just seeing pretty different behavior on Android and iOS. |
Do you have any workaround? |
Okay, Setting ScrollEnabled={false} prop makes the reordering work. Finding a workaround. @gitim would you recommend anything? will send a PR when I am able to fix this. |
Any another workaround if I need use scrolling? |
Adding another ScrollView around SortableList with controlled scrollEnabled works on Android. <ScrollView scrollEnabled={this.state.scrollEnabled}>
<SortableList
scrollEnabled={false}
onActivateRow={() => this.setState({ scrollEnabled: false })}
onReleaseRow={() => this.setState({ scrollEnabled: true })}
onChangeOrder={this.onChangeOrder}
renderRow={this.renderRow}
/>
</ScrollView> |
these lines in componentDidUpdate of SortableListComponent are causing this issue : if (prevProps.scrollEnabled !== scrollEnabled) {
this.setState({ scrollEnabled: prevProps.scrollEnabled });
} You can comment them. |
@ivanzotov I just copied your code, But still sorting is not working for me. Can you share |
Hey @sumnerwarren, thanks for your contribution: your fix is actually solving the Android sorting issue. |
@caterinamennito Only because this package does not seem to be maintained anymore. We switched to |
Hi,
I am using this package to render a sortable list, which works as intended in iOS but not on android. On Android on longpress it does get active but as soon as I try to move it the view scrolls and the item goes back to its place.
Here is my code :
Here is the renderRow Code :
React Native Version : 0.59.10
SortableList Version : 0.0.22
The text was updated successfully, but these errors were encountered: