1
我想模擬彈出一個視圖,當一個列表項被點擊。並使用此代碼,它工作正常,如果我不滾動列表視圖,並根本不工作,如果我滾動。反應本地模式與列表視圖項目點擊
renderGymData(rowData){
return(
<View>
<Modal
animationType={'none'}
transparent={false}
visible={!!this.state.selectedRow}>
....
</Modal>
<TouchableHighlight onPress={() => this.showGymDetail(rowData)} >
....
</TouchableHighlight>
</View>);
}
and the render method of my list view is
render() {
return (
<ListView
dataSource={this.state.dataSource}
renderRow={this.renderGymData.bind(this)}
style={styles.listView}>
</ListView>
);
}
我不想使用navigator.push因爲我想以模態出現。