Skip to content

Added accessibility prop to TextField's right button #876

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

Merged
merged 2 commits into from
Aug 5, 2020

Conversation

mendyEdri
Copy link
Contributor

TextField component now accepts right button accessibilityLabel

@mendyEdri mendyEdri changed the title add accessibility prop to TextField's right button Added accessibility prop to TextField's right button Aug 2, 2020
@mendyEdri mendyEdri requested a review from ethanshar August 2, 2020 14:54
@@ -609,7 +610,7 @@ export default class TextField extends BaseInput {
const {style, iconSource, iconColor} = rightButtonProps;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of passing all the props included in rightButtonProps, pass on the "rest" of the props that were not used specifically.

const {style, iconSource, iconColor, ...others} = rightButtonProps;
<TouchableOpacity {...others} style={[this.styles.rightButton, style]} onPress={this.onPressRightButton}>

@mendyEdri mendyEdri requested a review from ethanshar August 5, 2020 10:44
@ethanshar ethanshar merged commit b8926f3 into master Aug 5, 2020
@mendyEdri mendyEdri deleted the infra/textfield-right-button-accessibility branch September 15, 2020 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants