react-native-autocomplete-input
Advanced tools
Comparing version 5.5.0 to 5.5.1
@@ -16,4 +16,4 @@ import React from 'react'; | ||
const defaultRenderItems = ({ item }) => <Text>{String(item)}</Text>; | ||
const { data, containerStyle, hideResults, inputContainerStyle, listContainerStyle, onShowResults, onStartShouldSetResponderCapture = () => false, renderResultList: renderResultListFunction = DefaultResultList, renderTextInput: renderTextInputFunction = DefaultTextInput, flatListProps, style, ...textInputProps } = props; | ||
function renderResultList() { | ||
const { data, renderResultList: renderFunction = DefaultResultList, flatListProps } = props; | ||
const listProps = { | ||
@@ -26,14 +26,12 @@ data, | ||
}; | ||
return renderFunction(listProps); | ||
return renderResultListFunction(listProps); | ||
} | ||
function renderTextInput() { | ||
const { renderTextInput: renderFunction = DefaultTextInput, style } = props; | ||
const textProps = { | ||
...props, | ||
const renderProps = { | ||
...textInputProps, | ||
style: [styles.input, style], | ||
ref, | ||
}; | ||
return renderFunction(textProps); | ||
return renderTextInputFunction(renderProps); | ||
} | ||
const { data, containerStyle, hideResults, inputContainerStyle, listContainerStyle, onShowResults, onStartShouldSetResponderCapture = () => false, } = props; | ||
const showResults = data.length > 0; | ||
@@ -40,0 +38,0 @@ onShowResults?.(showResults); |
{ | ||
"name": "react-native-autocomplete-input", | ||
"version": "5.5.0", | ||
"version": "5.5.1", | ||
"description": "Pure javascript autocomplete input for react-native", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
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
12640
177