Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions Popover.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ var Popover = React.createClass({
propTypes: {
isVisible: PropTypes.bool,
onClose: PropTypes.func,
onBgPress:PropTypes.func
},
getInitialState() {
return {
Expand All @@ -59,6 +60,7 @@ var Popover = React.createClass({
arrowSize: DEFAULT_ARROW_SIZE,
placement: 'auto',
onClose: noop,
onBgPress:noop
};
},
measureContent(x) {
Expand Down Expand Up @@ -345,7 +347,9 @@ var Popover = React.createClass({
return (
<TouchableWithoutFeedback onPress={this.props.onClose}>
<View style={[styles.container, contentSizeAvailable && styles.containerVisible ]}>
<Animated.View style={[styles.background, ...extendedStyles.background]}/>
<TouchableWithoutFeedback onPress={this.props.onBgPress}>
<Animated.View style={[styles.background, ...extendedStyles.background]}/>
</TouchableWithoutFeedback>
<Animated.View style={[styles.popover, {
top: popoverOrigin.y,
left: popoverOrigin.x,
Expand All @@ -371,6 +375,7 @@ var styles = StyleSheet.create({
right: 0,
position: 'absolute',
backgroundColor: 'transparent',
zIndex:999
},
containerVisible: {
opacity: 1,
Expand All @@ -386,10 +391,6 @@ var styles = StyleSheet.create({
popover: {
backgroundColor: 'transparent',
position: 'absolute',
shadowColor: 'black',
shadowOffset: {width: 0, height: 2},
shadowRadius: 2,
shadowOpacity: 0.8,
},
content: {
borderRadius: 3,
Expand Down