Skip to content

Commit

Permalink
Fixing #5932 TouchableOpacity initial opacity bug
Browse files Browse the repository at this point in the history
  • Loading branch information
gorangajic committed Jul 19, 2016
1 parent a527ef2 commit d0bb72f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Libraries/Components/Touchable/TouchableOpacity.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,11 @@ var TouchableOpacity = React.createClass({
},

getInitialState: function() {
var childStyle = flattenStyle(this.props.style) || {};
var opacity = childStyle.opacity === undefined ? 1 : childStyle.opacity;
return {
...this.touchableGetInitialState(),
anim: new Animated.Value(1),
anim: new Animated.Value(opacity),
};
},

Expand Down

0 comments on commit d0bb72f

Please sign in to comment.