react-native-complete-flatlist
Advanced tools
Comparing version 2.0.9 to 2.0.10
@@ -134,2 +134,3 @@ import React from 'react'; | ||
showSearch, | ||
searchKey, | ||
isJelly, | ||
@@ -173,3 +174,3 @@ slide, | ||
<View style={[styles.container, backgroundStyles]}> | ||
{showSearch && searchbar} | ||
{(showSearch && !!searchKey.length) && searchbar} | ||
{this.props.elementBetweenSearchAndList} | ||
@@ -176,0 +177,0 @@ <FlatList |
{ | ||
"name": "react-native-complete-flatlist", | ||
"version": "2.0.9", | ||
"version": "2.0.10", | ||
"description": "An extension of React Native's Flatlist with search bar, highlighted search, pull to refresh, and etc is ready to use", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"publish": "npm publish --access=public" | ||
}, | ||
@@ -9,0 +10,0 @@ "repository": { |
@@ -83,3 +83,3 @@ # react-native-complete-flatlist | ||
| ----------------------------- | ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | ----------------------------------------------------------------------- | | ||
| `showSearch` | boolean | If `true`, search bar will be show | true | Optional | | ||
| `showSearch` | boolean | If `true` (and `searchKey` prop is defined), search bar will be shown. | true | Optional | | ||
| `isJelly` | boolean | If `true`, when user scroll, the list will expand a lil bit, and when user stop drag, the list will back to original size (iMessage on iPhone style) | false | Optional | | ||
@@ -93,7 +93,7 @@ | `slide` | string | Animation how every items come into the list. Can be "none", "left" or "right" | `none` | Optional | | ||
| `renderItem` | function that return a JSX element (Just like RN's ListView and FlatList) | Template of a row in the Flat List | null (open for PR if anyone wish to make default template for this) | Required (since I dont do default template yet) | | ||
| `renderSeparator` | function that return a JSX element to be rendered between rows(Just like RN's ListView and FlatList) | Template of separator in the Flat List | a thin line | Optional | | ||
| `renderSeparator` | function that return a JSX element to be rendered between rows(Just like RN's ListView and FlatList) | Template of separator in the Flat List | `() => <View style={{ height: 1, width: "80%", alignSelf: "center", backgroundColor: "#f2f2f2" }} />` | Optional | | ||
| `placeholder` | string | Placeholder of search field | "Search ..." | Optional | | ||
| `searchTextInputStyle` | object (style for React Native's TextInput component) | style for search field | null | Optional | | ||
| `highlightColor` | color | color of higlighted words background when match search keyword. Please read the pre caution if using this prop on top of the readme | yellow | Optional | | ||
| `searchKey` | array of string | This should be name of keys available in data which will be use to search. `**Warning: nested key not yet supported` | null | Optional (if not supplied, search field will not appear) | | ||
| `searchKey` | array of string | This should be name of keys available in data which will be use to search. If this prop is not supplied, search text input will not be rendered. `**Warning: nested key not yet supported` | [] | Optional (if not supplied, search field will not appear) | | ||
| `elementBetweenSearchAndList` | JSX element | What to render between searchbar and the list | null | Optional | | ||
@@ -100,0 +100,0 @@ | `refreshOnLoad` | boolean | If `true`, prop `pullToRefreshCallback` will be called if available | true | Optional | |
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
23629
208