react-native-autocomplete-input
Advanced tools
Comparing version 3.0.0 to 3.1.0
16
index.js
@@ -29,4 +29,9 @@ import React, { Component, PropTypes } from 'react'; | ||
inputContainerStyle: View.propTypes.style, | ||
/* | ||
* These styles will be applied to the container which surrounds | ||
* the result list. | ||
*/ | ||
listContainerStyle: View.propTypes.style, | ||
/** | ||
* These style will be applied to the result list view. | ||
* These style will be applied to the result list. | ||
*/ | ||
@@ -122,3 +127,8 @@ listStyle: ListView.propTypes.style, | ||
const { dataSource } = this.state; | ||
const { containerStyle, inputContainerStyle, onShowResults } = this.props; | ||
const { | ||
containerStyle, | ||
inputContainerStyle, | ||
listContainerStyle, | ||
onShowResults | ||
} = this.props; | ||
const showResults = dataSource.getRowCount() > 0; | ||
@@ -134,3 +144,3 @@ | ||
</View> | ||
<View> | ||
<View style={listContainerStyle}> | ||
{showResults && this.renderResultList()} | ||
@@ -137,0 +147,0 @@ </View> |
{ | ||
"name": "react-native-autocomplete-input", | ||
"version": "3.0.0", | ||
"version": "3.1.0", | ||
"description": "Pure javascript autocomplete input for react-native", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -89,3 +89,4 @@ # react-native-autocomplete-input | ||
| inputContainerStyle | style | These styles will be applied to the container which surrounds the textInput component. | | ||
| listStyle | style | These style will be applied to the result list view. | | ||
| listContainerStyle | style | These styles will be applied to the container which surrounds the result list. | | ||
| listStyle | style | These style will be applied to the result list. | | ||
| onShowResult | function | `onShowResult` will be called when the autocomplete suggestions appear or disappear. | | ||
@@ -95,5 +96,7 @@ | renderItem | function | `renderItem` will be called to render the data objects which will be displayed in the result view below the text input. | | ||
| renderTextInput | function | render custom TextInput. All props passed to this function. | | ||
| style | style | These styles will be applied to the textInput component. | | ||
## Known issues | ||
* By default the autocomplete will not behave as expected inside a `<ScrollView />`. Set the scroll view's prop `keyboardShouldPersistTaps={true}` to fix this ([#5](https://github.com/l-urence/react-native-autocomplete-input/issues/5)). | ||
## Contribute | ||
Feel free to open issues or do a PR! |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11317
188
101