I am viewing a list view using:
render() {
return (
<ListView
dataSource={this.state.dataSource}
renderRow={this.renderRow.bind(this)}/>
);
}
and
var dataSource = new ListView.DataSource(
{rowHasChanged: (r1, r2) => r1.id !== r2.id});
this.state = {
dataSource: dataSource.cloneWithRows(this.props.deals)
};
I hope I can sort this by value on the data source (this.props.deals.distance). Looking online and through documents, I cannot find a way to do this. Any tips?
user2540748
source
share