-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
fix: don't expose handler-less TouchableRipple as a disabled control #5071
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -78,8 +78,6 @@ const TextInputIcon = ({ | |||||||||
| isDisabled: disabled, | ||||||||||
| }); | ||||||||||
|
|
||||||||||
| const onPressHandler = disabled ? undefined : onPress; | ||||||||||
|
|
||||||||||
| return ( | ||||||||||
| <View style={styles.iconWrapper}> | ||||||||||
| <IconButton | ||||||||||
|
|
@@ -88,7 +86,8 @@ const TextInputIcon = ({ | |||||||||
| iconColor={color} | ||||||||||
| size={iconSize} | ||||||||||
| style={[styles.icon, style]} | ||||||||||
| onPress={onPressHandler} | ||||||||||
| disabled={disabled} | ||||||||||
| onPress={onPress} | ||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what do you think about making it non-accessible when it has no
Suggested change
updated snapshot still has |
||||||||||
| /> | ||||||||||
| </View> | ||||||||||
| ); | ||||||||||
|
|
||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about keeping existing disabled-color precedence here & handling the
TextInput.Iconcase locally?moving
customIconColorfirst changes every<IconButton disabled iconColor="......" />.Buttonstill give disabled colors precedence (link) whileIconButtondocs listonSurfaceDisabled(link)however, if this global behavior change is intentional, maybe we can at least document it?