Hi, is there a way to manually open a row by an onPress?
Hey @kyangy, this behavior isn't currently technically supported but there is some hackery you could do in meantime:
class Example {
openRow = (rowRef) => {
// Use an internal method to manually swipe the row open to whatever value you pass
rowRef.manuallySwipeRow(50);
}
render() {
<SwipeListView
renderRow={ (data, secId, rowId, rowMap) => (
<TouchableHighlight
onPress={ _ => this.openRow(rowMap[`${secId}${rowId}`])}
/>
}
/>
}
}
Hope that helps!
(sorry for the delay in responding!)
Closing as this seems to be sufficient for most people
Hello and thanks for your answer. Can you explain a little bit how and where to create this function?
Most helpful comment
Hey @kyangy, this behavior isn't currently technically supported but there is some hackery you could do in meantime:
Hope that helps!
(sorry for the delay in responding!)