Closed constantinosergiou closed 7 years ago
@constantinosergiou yup, just make sure the icon is inside a TouchableHighlight
and pass the props.sortHandlers
onto that, e.g.
class Example extends Component {
render () {
return (
<SortableListView
...
renderRow={row => <RowComponent data={row} />}
/>
)
}
}
class RowComponent extends Component {
render () {
return (
<View>
<Text>{this.props.data.text}</Text>
<TouchableHighlight {...this.props.sortHandlers}>
<YourIconGoesHere />
</TouchableHighlight>
</View>
)
}
}
Closing.. Thanks @jackdcrawford for the help.
with the method onPress