Created
September 26, 2017 13:21
-
-
Save hanipcode/7e2b56326b5dc970fc7c33591cae8dc5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react'; | |
| import { StyleSheet, Text, View } from 'react-native'; | |
| import AutoCompleteBox from '../components/AutoCompleteBox'; | |
| import AutoCompleteResultList from '../components/AutoCompleteResultList'; | |
| class SearchPage extends Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { | |
| query: '', | |
| data: [] | |
| }; | |
| } | |
| render() { | |
| return ( | |
| <View> | |
| <AutoCompleteBox | |
| placeholder="Masukan Nama Tempat" | |
| value={this.state.query} | |
| onChangeText={query => this.setState({ query })} | |
| /> | |
| <AutoCompleteResultList data={this.state.data} /> | |
| </View> | |
| ); | |
| } | |
| } | |
| export default SearchPage; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment