Created
September 30, 2017 10:01
-
-
Save hanipcode/a9ee6b7dfdecd04e5db9db60be46452c 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
| //rest of code | |
| const styles = StyleSheet.create({ | |
| FloatingContainer: { | |
| position: 'absolute', | |
| alignSelf: 'stretch', | |
| top: 55, | |
| left: 0, | |
| right: 0, | |
| marginHorizontal: 22, | |
| borderWidth: 2, | |
| borderColor: '#aaa', | |
| elevation: 4, | |
| borderBottomLeftRadius: 10, | |
| borderBottomRightRadius: 10, | |
| backgroundColor: '#FFF' | |
| }, | |
| AutoCompleteResultList: { | |
| elevation: 1, | |
| flexGrow: 1, | |
| alignSelf: 'stretch' | |
| }, | |
| //..rest of code | |
| }); | |
| //..rest of code | |
| class AutoCompleteResultList extends Component { | |
| //..rest of code | |
| render() { | |
| if (this.props.data.length === 0) { | |
| return <View />; | |
| } | |
| return ( | |
| <View style={styles.FloatingContainer}> | |
| <FlatList | |
| {...this.props} | |
| contentContainerStyle={styles.AutoCompleteResultList} | |
| renderItem={itemValue => this.renderItem(itemValue)} | |
| /> | |
| </View> | |
| ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment