Skip to content
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

Switch component don't update touched property #49

Open
GrzegorzStanczyk opened this issue Aug 13, 2019 · 3 comments
Open

Switch component don't update touched property #49

GrzegorzStanczyk opened this issue Aug 13, 2019 · 3 comments

Comments

@GrzegorzStanczyk
Copy link

Describe the bug
When we touch or change Switch value. Touched property don't change.

To Reproduce
Steps to reproduce the behavior:

  1. Change Switch value
  2. Check form control touched property
  3. It still have false value

Expected behavior
Touched value should change to true on first control touch.

Desktop (please complete the following information):

  • OS: [iOS 10.14.6]
  • Browser [chrome 76.0.3809.100]
@bietkul
Copy link
Owner

bietkul commented Aug 13, 2019

Can you please give me more info, like which version you're using & what is the platform i.e React-Native or React?

@GrzegorzStanczyk
Copy link
Author

Sorry, I did not specify. React Native 0.59.10. And ios xcode iPhoneX 12.2 simulator. Switch native component
<Switch label={label} style={styles.switch} {...props} {...handler('switch')} />

@bietkul
Copy link
Owner

bietkul commented Aug 13, 2019

Thanks, I'll get back to you soon.
Meanwhile, you can try to call markAsTouched method to register the touch event on onBlur in Switch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants