react-native-sectioned-multi-select
Advanced tools
Comparing version 0.6.1 to 0.6.2
@@ -6,2 +6,3 @@ import React, { PureComponent } from 'react' | ||
View, | ||
SafeAreaView, | ||
TouchableOpacity, | ||
@@ -65,2 +66,5 @@ TouchableNativeFeedback, | ||
}, | ||
chipsWrapper: { | ||
}, | ||
chipContainer: { | ||
@@ -176,2 +180,3 @@ | ||
modalAnimationType: PropTypes.string, | ||
modalWithSafeAreaView: PropTypes.bool, | ||
hideSearch: PropTypes.bool, | ||
@@ -234,2 +239,3 @@ footerComponent: PropTypes.object, | ||
modalAnimationType: 'fade', | ||
modalWithSafeAreaView: false, | ||
hideSearch: false, | ||
@@ -635,4 +641,21 @@ selectChildren: false, | ||
const { styles, colors } = this.state | ||
const { customChipsRenderer } = this.props | ||
return customChipsRenderer && customChipsRenderer({ ...this.props, colors, styles }) | ||
const { | ||
displayKey, | ||
items, | ||
selectedItems, | ||
subKey, | ||
uniqueKey, | ||
customChipsRenderer, | ||
} = this.props | ||
return customChipsRenderer && | ||
customChipsRenderer({ | ||
colors, | ||
displayKey, | ||
items, | ||
selectedItems, | ||
styles, | ||
subKey, | ||
uniqueKey, | ||
}) | ||
} | ||
@@ -653,3 +676,3 @@ | ||
<View | ||
style={{ | ||
style={[{ | ||
flexWrap: 'wrap', | ||
@@ -659,3 +682,3 @@ alignItems: 'center', | ||
flexDirection: 'row', | ||
}} | ||
}, styles.chipsWrapper]} | ||
> | ||
@@ -820,2 +843,16 @@ {selectedItems.length > 1 && showRemoveAll ? | ||
BackdropView = ({ children, ...props }) => { | ||
const { modalWithSafeAreaView } = this.props | ||
return ( | ||
modalWithSafeAreaView ? | ||
<SafeAreaView {...props}> | ||
{children} | ||
</SafeAreaView> | ||
: | ||
<View {...props}> | ||
{children} | ||
</View> | ||
) | ||
} | ||
// _renderSubItemFlatList = ({ item }) => ( | ||
@@ -879,3 +916,3 @@ // <RowSubItem | ||
> | ||
<View style={[{ flex: 1, backgroundColor: 'rgba(0,0,0,0.5)' }, styles.backdrop]}> | ||
<this.BackdropView style={[{ flex: 1, backgroundColor: 'rgba(0,0,0,0.5)' }, styles.backdrop]}> | ||
<View style={[{ | ||
@@ -1017,3 +1054,3 @@ overflow: 'hidden', | ||
</View> | ||
</View> | ||
</this.BackdropView> | ||
</Modal> | ||
@@ -1020,0 +1057,0 @@ {chipsPosition === 'top' && this._renderChips()} |
{ | ||
"name": "react-native-sectioned-multi-select", | ||
"version": "0.6.1", | ||
"version": "0.6.2", | ||
"description": "a multi (or single) select component with support for sub categories, search, chips.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -189,2 +189,3 @@ # react-native-sectioned-multi-select | ||
|modalAnimationType |'fade' | string |The animation type of the Modal (fade or slide) | | ||
|modalSafeAreaView | false | bool | If true uses a `<SafeAreaView>` component for the _backdrop_ component. Useful for e.g iPhone X notch | | ||
@@ -213,2 +214,3 @@ | ||
|cancelIconComponent | Material `cancel` | object | The cancel button's inner component | | ||
|customChipsRenderer | | function | Use a custom render function for custom chips: receives uniqueKey, subKey, displayKey, items, selectedItems, colors, styles. should return valid jsx | | ||
|chipRemoveIconComponent | Material `close` | object | The chip remove button's icon component | | ||
@@ -265,2 +267,3 @@ |styles | {} | object |Styles object - see styles section | | ||
`subSeparator` | ||
`chipsWrapper` | ||
`chipContainer` | ||
@@ -267,0 +270,0 @@ `chipText` |
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
3018109
2036
274