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

nullControl: callback is not a function #67

Closed
wodCZ opened this issue Jan 11, 2018 · 2 comments
Closed

nullControl: callback is not a function #67

wodCZ opened this issue Jan 11, 2018 · 2 comments

Comments

@wodCZ
Copy link

wodCZ commented Jan 11, 2018

Hi,

Today I have implemented this package, and found one issue with hidden controls.

Problem is that when controls like back button are hidden, they still render Touchable zone with onPress callback, that expects callback (see renderControl), but renderNullControl doesn't pass any callback to renderControl. This causes error callback is not a function when you tap on location where back button touch zone is.

I'd suggest modifying renderNullControl to pass empty callback function to renderControl method, or to modify renderControl to check if callback is set.

Please let me know which variant you'd like more and whether you want me to prepare pull request.

Thanks!

@kylemilloy
Copy link
Contributor

Thanks for this. I'm going to change renderNullControl to just return an empty <View/>.

Pushing up a fix now.

kylemilloy pushed a commit that referenced this issue Jan 11, 2018
@wodCZ
Copy link
Author

wodCZ commented Jan 12, 2018

Awesome, thanks!

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

No branches or pull requests

2 participants