mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-26 23:24:06 +08:00
[react-native] In TouchableOpacity, access .props on element, not component
This commit is contained in:
@@ -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();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user