Fix backgroundColor with TouchableHighlight
Reviewed By: blairvanderhoof Differential Revision: D6575797 fbshipit-source-id: 913a5916def9719689917e83e917f44503b99a60
This commit is contained in:
parent
88f6f69152
commit
5a1171ebfa
|
@ -189,7 +189,7 @@ const TouchableHighlight = createReactClass({
|
|||
return {
|
||||
...this.touchableGetInitialState(),
|
||||
extraChildStyle: null,
|
||||
extraUnderlayStyle: styles.inactiveUnderlay,
|
||||
extraUnderlayStyle: null,
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -285,7 +285,7 @@ const TouchableHighlight = createReactClass({
|
|||
if (this._hasPressHandler()) {
|
||||
this.setState({
|
||||
extraChildStyle: null,
|
||||
extraUnderlayStyle: styles.inactiveUnderlay,
|
||||
extraUnderlayStyle: null,
|
||||
});
|
||||
this.props.onHideUnderlay && this.props.onHideUnderlay();
|
||||
}
|
||||
|
@ -342,10 +342,4 @@ const TouchableHighlight = createReactClass({
|
|||
},
|
||||
});
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
inactiveUnderlay: {
|
||||
backgroundColor: 'transparent',
|
||||
},
|
||||
});
|
||||
|
||||
module.exports = TouchableHighlight;
|
||||
|
|
|
@ -17,14 +17,7 @@ exports[`TouchableHighlight renders correctly 1`] = `
|
|||
onResponderTerminate={[Function]}
|
||||
onResponderTerminationRequest={[Function]}
|
||||
onStartShouldSetResponder={[Function]}
|
||||
style={
|
||||
Array [
|
||||
Object {},
|
||||
Object {
|
||||
"backgroundColor": "transparent",
|
||||
},
|
||||
]
|
||||
}
|
||||
style={Object {}}
|
||||
testID={undefined}
|
||||
tvParallaxProperties={undefined}
|
||||
>
|
||||
|
|
Loading…
Reference in New Issue