如何通过此代码创建搜索列表:
onPress={() =>this.props.navigation.navigate('LinhaDiurno03')
何时按下项目?
...。我希望列表中的每个项目在应用程序中打开一个不同的屏幕。...
我该怎么办?
这是我的睾丸:
此处是一些代码:
var items = [
//name key is must.It is to show the text in front
{id: 1,name: 'ANA RECH',prestadora: 'UNIDOS',pos: 'P01'},{id: 2,name: 'ARROIO DAS MARRECAS',{id: 3,name: 'VILA SECA',];
onItemSelect={item => Alert.alert(" ",JSON.stringify(item.prestadora + ",LINHA: " + item.pos),[{ text: "open the especifc screen",onPress: () =>('some code here')},{ text: "bacvk",onPress: () => console.log("OK pressed")}],{ cancelable: true })}
//onItemSelect called after the selection from the dropdown