react-native-sectioned-multi-select
Advanced tools
Comparing version 0.6.2 to 0.6.3
@@ -0,2 +1,7 @@ | ||
# Changelog | ||
## 0.6.3 - 2018-11-27 | ||
### Added | ||
- Add `modalWithTouchable` prop. Set to true to wrap the backdrop in a `TouchableWithoutFeedback`, which will close the selector (also fires `onToggleSelector(false)`) #76 | ||
## 0.6.1 - 2018-10-23 | ||
@@ -11,2 +16,3 @@ | ||
- Add `customChipsRenderer` function. receives all props. #56 | ||
- Add `modalSafeAreaView` prop. Set to true to use a `SafeAreaView` instead of a `View` as the backdrop inside the `Modal`. | ||
@@ -13,0 +19,0 @@ ## 0.6.0 - 2018-10-02 |
@@ -179,2 +179,3 @@ import React, { PureComponent } from 'react' | ||
modalWithSafeAreaView: PropTypes.bool, | ||
modalWithTouchable: PropTypes.bool, | ||
hideSearch: PropTypes.bool, | ||
@@ -238,2 +239,3 @@ footerComponent: PropTypes.object, | ||
modalWithSafeAreaView: false, | ||
modalWithTouchable: false, | ||
hideSearch: false, | ||
@@ -839,12 +841,16 @@ selectChildren: false, | ||
BackdropView = ({ children, ...props }) => { | ||
const { modalWithSafeAreaView } = this.props | ||
const { modalWithSafeAreaView, modalWithTouchable } = this.props | ||
const Component = modalWithSafeAreaView ? SafeAreaView : View; | ||
const Wrapper = modalWithTouchable ? TouchableWithoutFeedback : null; | ||
return ( | ||
modalWithSafeAreaView ? | ||
<SafeAreaView {...props}> | ||
{children} | ||
</SafeAreaView> | ||
Wrapper ? | ||
<Wrapper onPress={this._closeSelector}> | ||
<Component {...props}> | ||
{children} | ||
</Component> | ||
</Wrapper> | ||
: | ||
<View {...props}> | ||
<Component {...props}> | ||
{children} | ||
</View> | ||
</Component> | ||
) | ||
@@ -851,0 +857,0 @@ } |
{ | ||
"name": "react-native-sectioned-multi-select", | ||
"version": "0.6.2", | ||
"version": "0.6.3", | ||
"description": "a multi (or single) select component with support for sub categories, search, chips.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -189,5 +189,5 @@ # 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 | | ||
|modalWithSafeAreaView | false | bool | If true uses a `<SafeAreaView>` component for the _backdrop_ component. Useful for e.g iPhone X notch | | ||
|modalWithTouchable | false | bool | If true wraps the _backdrop_ component with `<TouchableWithoutFeedback>` . Closes modal on press (`this._closeSelector()`; fires `onToggleSelector(false)`). | | ||
### Customization | ||
@@ -194,0 +194,0 @@ |
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
3018951
2042