react-native-sortable-list
react-native-sortable-list copied to clipboard
onPressRow and onReleaseRow not working
onPressRow and onReleaseRow event handlers are never fired. `<SortableListView data={this.state.data} moveOnPressIn={true}
scrollEnabled={false}
onRowMoved={e => {
console.log(e.from + " " + e.to);
}}
onPressRow={(key) => {
this.console.log("onPressRow");
}}
onReleaseRow={(key, currentOrder) => {
this.console.log("onReleaseRow");
}}
renderRow={(row) => {;
return (
<TouchableOpacity>
{...}
</TouchableOpacity>
);
}}
/>`
Here is some of package information.
"react": "16.9.0", "react-native": "0.61.5", "react-native-sortable-listview": "^0.2.9"
Please help me to resolve this problem and kindly teach me what is wrong.
One more issue, sortablelistview not working well inside scrollview. When I try to drag and drop, it scrolls background scrollview instead. And that's why i'm going to use 'onPressRow' and 'onReleaseRow'. Please let me know a solution about this problem too. Thank you.
@andrewterex20190813 Hey there, I was noticing a similar issue, but it looks like the issue is that the logs are getting swallowed somewhere, as they appear for me in MetroBundler logs, but not in my JS console (using React-Native Debugger).
If you were to add a debugger e.g. onReleaseRow={() => {debugger}) you should see it catch.
Hopefully that helps!