Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TouchableOpacity] Reset opacity to the inactiveValue rather than alw…
…ays 1.0 Summary: As per #941 - fixes bug with `TouchabeOpacity` always reseting child opacity to `1.0` after press. A note about the code: we could probably use a general `getNativeProp(propName, callback)` function rather than `getOpacity` but just used that as it was simpler for this specific PR, perhaps that refactor could be left to another - or maybe there is a way to do this already that I missed. Before: ![bug](https://cloud.githubusercontent.com/assets/90494/7287207/52d6a686-e907-11e4-8e16-04b2ddd0582c.gif) After: ![after](https://cloud.githubusercontent.com/assets/90494/7287689/5aca4776-e90c-11e4-8c40-aa6bd3e822d8.gif) Example code: ```javascript 'use strict'; var React = require('react-native'); var { AppRegistry, StyleSheet, Text, View, TouchableOpacity, } = React; var TestIt = React.createClass({ render() { return ( <View style={styles.container}> <TouchableOpacity activeOpacity={0.3}> <View style={styles.searchButton}> <Text> Closes #977 Github Author: Brent Vatne <brent.vatne@madriska.com> Test Plan: Imported from GitHub, without a `Test Plan:` line.
- Loading branch information