...
|
...
|
@@ -32,20 +32,29 @@ export default class Message extends Component { |
|
|
}
|
|
|
|
|
|
_renderRow(rowData: object, sectionID: number, rowID: number) {
|
|
|
return null;
|
|
|
|
|
|
return (
|
|
|
<TouchableOpacity
|
|
|
onPress={() => {
|
|
|
console.log(rowID)
|
|
|
}}
|
|
|
>
|
|
|
<View style={styles.rowContainer}>
|
|
|
<Text>{rowData.get('title')}</Text>
|
|
|
<Text>{rowData.get('detail')}</Text>
|
|
|
</View>
|
|
|
</TouchableOpacity>
|
|
|
);
|
|
|
}
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
|
let dataSource = [];
|
|
|
|
|
|
let dataSource = this.props.data.dataSource.toArray();
|
|
|
|
|
|
return (
|
|
|
<View style={styles.container}>
|
|
|
<ListView
|
|
|
ref={(c) => {
|
|
|
this.listView = c;
|
|
|
}}
|
|
|
contentContainerStyle={styles.contentContainer}
|
|
|
dataSource={this.dataSource.cloneWithRows(dataSource)}
|
|
|
renderRow={this._renderRow}
|
...
|
...
|
@@ -66,4 +75,7 @@ let styles = StyleSheet.create({ |
|
|
contentContainer: {
|
|
|
|
|
|
},
|
|
|
rowContainer: {
|
|
|
|
|
|
},
|
|
|
}); |
...
|
...
|
|