react-native-complete-flatlist
Advanced tools
Comparing version 2.0.4 to 2.0.5
{ | ||
"name": "react-native-complete-flatlist", | ||
"version": "2.0.4", | ||
"version": "2.0.5", | ||
"description": "An extension of React Native's Flatlist with search bar, highlighted search, pull to refresh, and etc is ready to use", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -10,3 +10,3 @@ # react-native-complete-flatlist | ||
`renderItem` props return `data` and `index` parameters | ||
`data` parameter returns a single element in `data` array. But if search text is not empty, `data` parameter will return new structure of JSON object (in order to render highlighted text in jsx). This might break your logic. Therefore, if you want to access original structure of your data, it will be under `data.cleanData`. Remember, `data.cleanData` only exist if search text is not empty (user is searching) | ||
`data` parameter returns a single element in `data` array. But if search text is not empty dan `highlightColor` props is set to any color, `data` parameter will return new structure of JSON object (in order to render highlighted text in jsx). This might break your logic. Therefore, if you want to access original structure of your data, it will be under `data.cleanData`. Remember, `data.cleanData` only exist if `highlightColor` props and search textfield is not empty (user is searching) | ||
@@ -64,3 +64,2 @@ Usage : | ||
searchKey={['name', 'status', 'time', 'date']} | ||
highlightColor="yellow" | ||
pullToRefreshCallback={() => { | ||
@@ -106,3 +105,3 @@ alert('refreshing'); | ||
| `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 | yellow | 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) | | ||
@@ -109,0 +108,0 @@ | `elementBetweenSearchAndList` | JSX element | What to render between searchbar and the list | null | 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
24340
128