-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TouchableOpacity
does not let you control opacity when disabled
prop changes
#17105
Labels
Resolution: Locked
This issue was locked by the bot.
Comments
maxkomarychev
changed the title
Dec 7, 2017
TouchableOpacity
does not change let you control opacity when disabled
prop is changesTouchableOpacity
does not change let you control opacity when disabled
prop changes
maxkomarychev
added a commit
to maxkomarychev/react-native
that referenced
this issue
Dec 7, 2017
fixes facebook#17105 If you render ``` <TouchableOpacity disabled={true} style={{opacity: 0.5}} > ... </TouchableOpacity> ``` and then ``` <TouchableOpacity disabled={false} style={{opacity: 1}} > ... </TouchableOpacity> ``` The content of `TouchableOpacity` will still have opacity = 0.5 because real opacity is controlled by animated property which should be properly updated when `disabled` prop changes.
maxkomarychev
changed the title
Dec 7, 2017
TouchableOpacity
does not change let you control opacity when disabled
prop changesTouchableOpacity
does not let you control opacity when disabled
prop changes
I confirm that, I hope it can be fixed soon. Thanks! |
as a matter of fact I have provided fix for this, however no comments from maintainers for a month.. #17106 |
maxkomarychev
added a commit
to maxkomarychev/react-native
that referenced
this issue
Jan 6, 2018
fixes facebook#17105 If you render ``` <TouchableOpacity disabled={true} style={{opacity: 0.5}} > ... </TouchableOpacity> ``` and then ``` <TouchableOpacity disabled={false} style={{opacity: 1}} > ... </TouchableOpacity> ``` The content of `TouchableOpacity` will still have opacity = 0.5 because real opacity is controlled by animated property which should be properly updated when `disabled` prop changes.
@maxkomarychev It seems the problem is not solved so far. But I found the solution. You just need to Hope this will help more people to save time |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Is this a bug report?
Yes
Have you read the Contributing Guidelines?
Yes
Environment
Environment:
OS: macOS Sierra 10.12.6
Node: 8.7.0
Yarn: 1.2.1
npm: 5.4.2
Watchman: 4.7.0
Xcode: Xcode 9.1 Build version 9B55
Android Studio: 3.0 AI-171.4443003
Packages: (wanted => installed)
react: 16.0.0 => 16.0.0
react-native: ^0.50.3 => 0.50.3
Steps to Reproduce
TochableOpacity
with propdisabled = true
and styleopacity: 0.5
false
and style toopacity: 1
Expected Behavior
Opacity of component should change from 0.5 to 1
Actual Behavior
Opacity remains the same unless you press the component (which still looks like disabled)
Reproducible Demo
https://snack.expo.io/rJhh9F8Zz
The text was updated successfully, but these errors were encountered: