[react-native] In TouchableOpacity, access .props on element, not component
This commit is contained in:
parent
ec9015d005
commit
5e51fac8d5
|
@ -106,10 +106,8 @@ var TouchableOpacity = React.createClass({
|
|||
},
|
||||
|
||||
touchableHandleActivePressOut: function() {
|
||||
var childStyle = (
|
||||
this.refs[CHILD_REF].props &&
|
||||
flattenStyle(this.refs[CHILD_REF].props.style)
|
||||
) || {};
|
||||
var child = onlyChild(this.props.children);
|
||||
var childStyle = flattenStyle(child.props.style) || {};
|
||||
this.setOpacityTo(childStyle.opacity === undefined ? 1 : childStyle.opacity);
|
||||
this.props.onPressOut && this.props.onPressOut();
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue