|
@@ -7,6 +7,7 @@ const {
|
7
|
7
|
View,
|
8
|
8
|
Button,
|
9
|
9
|
Text,
|
|
10
|
+ TouchableOpacity,
|
10
|
11
|
Platform
|
11
|
12
|
} = require('react-native');
|
12
|
13
|
|
|
@@ -26,7 +27,6 @@ class SearchControllerScreen extends Component {
|
26
|
27
|
visible: true
|
27
|
28
|
},
|
28
|
29
|
searchBar: true,
|
29
|
|
- searchBarHiddenWhenScrolling: true,
|
30
|
30
|
translucent: true,
|
31
|
31
|
searchBarPlaceholder: 'Start Typing'
|
32
|
32
|
}
|
|
@@ -63,6 +63,25 @@ class SearchControllerScreen extends Component {
|
63
|
63
|
return text;
|
64
|
64
|
}
|
65
|
65
|
|
|
66
|
+ onItemPressed = () => {
|
|
67
|
+ Navigation.push(this.props.componentId, {
|
|
68
|
+ component: {
|
|
69
|
+ name: 'navigation.playground.PushedScreen',
|
|
70
|
+ options: {
|
|
71
|
+ topBar: {
|
|
72
|
+ title: {
|
|
73
|
+ text: 'PushedScreen'
|
|
74
|
+ },
|
|
75
|
+ largeTitle: {
|
|
76
|
+ visible: true
|
|
77
|
+ },
|
|
78
|
+ translucent: true,
|
|
79
|
+ }
|
|
80
|
+ }
|
|
81
|
+ },
|
|
82
|
+ });
|
|
83
|
+ }
|
|
84
|
+
|
66
|
85
|
render() {
|
67
|
86
|
return (
|
68
|
87
|
<FlatList
|
|
@@ -70,11 +89,11 @@ class SearchControllerScreen extends Component {
|
70
|
89
|
data={this.filteredData()}
|
71
|
90
|
contentContainerStyle={styles.contentContainer}
|
72
|
91
|
renderItem={({ item }) => (
|
73
|
|
- <View style={styles.row}>
|
|
92
|
+ <TouchableOpacity style={styles.row} onPress={this.onItemPressed}>
|
74
|
93
|
<Text style={styles.rowText} testID={testIDs.SEARCH_RESULT_ITEM}>
|
75
|
94
|
{this.highlight(item.key, this.state.query)}
|
76
|
95
|
</Text>
|
77
|
|
- </View>
|
|
96
|
+ </TouchableOpacity>
|
78
|
97
|
)}
|
79
|
98
|
/>
|
80
|
99
|
);
|