react-native-sectioned-multi-select
Advanced tools
Comparing version 0.7.0 to 0.7.1
# Changelog | ||
## 0.7.1 - 2019-08-01 | ||
### Added | ||
- added `itemsFlatListProps` and `subItemsFlatListProps` to be able to pass in custom FlatList props object | ||
## 0.7.0 - 2019-06-25 | ||
@@ -4,0 +10,0 @@ |
@@ -330,3 +330,3 @@ import React, { Component } from 'react' | ||
// the colour in the url on this site has to be a hex w/o hash | ||
const iconColor = color && color.substr(0, 1) === '#' ? `${color.substr(1)}/` : '' | ||
const iconColor = color && color.substr(0, 1) === '#' ? `${color.substr(1)}/` : '/' | ||
@@ -341,3 +341,3 @@ const Search = ( | ||
<Image | ||
source={{ uri: `https://png.icons8.com/arrow-down/${iconColor}ios/` }} | ||
source={{ uri: `https://png.icons8.com/down/${iconColor}ios/` }} | ||
style={{ width: size, height: size }} | ||
@@ -348,3 +348,3 @@ /> | ||
<Image | ||
source={{ uri: `https://png.icons8.com/arrow-up/${iconColor}ios/` }} | ||
source={{ uri: `https://png.icons8.com/up/${iconColor}ios/` }} | ||
style={{ width: size, height: size }} | ||
@@ -355,3 +355,3 @@ /> | ||
<Image | ||
source={{ uri: `https://png.icons8.com/close-button/${iconColor}ios/` }} | ||
source={{ uri: `https://png.icons8.com/multiply/${iconColor}ios/` }} | ||
style={{ width: size, height: size }} | ||
@@ -363,3 +363,3 @@ /> | ||
<Image | ||
source={{ uri: `https://png.icons8.com/check-mark/${iconColor}android/` }} | ||
source={{ uri: `https://png.icons8.com/checkmark/${iconColor}android/` }} | ||
style={{ width: size / 1.5, height: size / 1.5 }} | ||
@@ -366,0 +366,0 @@ /> |
@@ -211,2 +211,3 @@ import React, { Component } from 'react' | ||
iconRenderer: Icon, | ||
subItemsFlatListProps, | ||
} = this.props | ||
@@ -313,2 +314,4 @@ const hasDropDown = item[subKey] && item[subKey].length > 0 && showDropDowns | ||
renderItem={this._renderSubItemFlatList} | ||
initialNumToRender={20} | ||
{...subItemsFlatListProps} | ||
/> | ||
@@ -315,0 +318,0 @@ )} |
@@ -183,2 +183,4 @@ import React, { PureComponent } from 'react' | ||
iconRenderer: PropTypes.oneOfType([PropTypes.func, PropTypes.object]), | ||
itemsFlatListProps: PropTypes.object, | ||
subItemsFlatListProps: PropTypes.object, | ||
} | ||
@@ -242,2 +244,4 @@ | ||
parentChipsRemoveChildren: false, | ||
itemsFlatListProps: {}, | ||
subItemsFlatListProps: {} | ||
} | ||
@@ -951,7 +955,5 @@ | ||
disabled, | ||
itemsFlatListProps, | ||
} = this.props | ||
const { | ||
searchTerm, selector, styles, colors | ||
} = this.state | ||
const { searchTerm, selector, styles, colors } = this.state | ||
const renderItems = searchTerm ? this._filterItems(searchTerm.trim()) : items | ||
@@ -1050,2 +1052,3 @@ const confirmFont = confirmFontFamily.fontFamily && confirmFontFamily | ||
renderItem={this._renderItemFlatList} | ||
{...itemsFlatListProps} | ||
/> | ||
@@ -1052,0 +1055,0 @@ </View> |
{ | ||
"name": "react-native-sectioned-multi-select", | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"description": "a multi (or single) select component with support for sub categories, search, chips.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -233,2 +233,4 @@ # react-native-sectioned-multi-select | ||
| iconRenderer | | function OR object | Use your own icon component function. Receives name, size (in some cases), and style props | | ||
| itemsFlatListProps | {} | object | extra props to add to / override the FlatList of parent items | | ||
| subItemsFlatListProps | {} | object | extra props to add to / override the parent items' sub items FlatList | | ||
@@ -235,0 +237,0 @@ ## Colors |
@@ -1,10 +0,10 @@ | ||
## Recipes | ||
# Recipes | ||
Examples of commonly requested functions/patterns. Required props/functions ommited for brevity. | ||
### Ref | ||
## Ref | ||
Some of these examples use a ref to the component like this: `ref={SectionedMultiSelect => (this.SectionedMultiSelect = SectionedMultiSelect)}` | ||
### Custom select text | ||
## Custom select text | ||
@@ -40,3 +40,3 @@ ```js | ||
### Limit selection count | ||
## Limit selection count | ||
@@ -79,3 +79,3 @@ A basic example of using the confirm button text to show the user how many items they have selected / can select | ||
### Select or remove all items | ||
## Select or remove all items | ||
@@ -109,3 +109,3 @@ Renders a button that removes all items if anything is selected, or selects all items if nothing is selected. | ||
### Item icons | ||
## Item icons | ||
@@ -137,3 +137,3 @@ You can add custom icons next to individual items/sub items by adding them to your items. | ||
### Custom icon renderer | ||
## Custom icon renderer | ||
@@ -257,3 +257,3 @@ Create your icon function | ||
### Search adornment | ||
## Search adornment | ||
@@ -260,0 +260,0 @@ Adds a button next to search bar when searching something that doesn't exist in the items. |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 3 instances in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
296
2
3110459
30
2383