Skip to content

Touchable* inside Row element #31

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

Closed
tbenshalom opened this issue Apr 1, 2017 · 4 comments
Closed

Touchable* inside Row element #31

tbenshalom opened this issue Apr 1, 2017 · 4 comments

Comments

@tbenshalom
Copy link

Hi,
When I have Touchable* element inside "row", the touchable element not receiving the touch event, and its "onPress" event do not raise.
I think reason is in this line in Row.js:
onMoveShouldSetPanResponder: () => !this._isDisabled(),

if I'm replacing it with the following line, all works:
onMoveShouldSetPanResponder: () => false,

But I'm new to RN and I'm not sure if its the correct way to "fix" this issue, and what can be the implications.

There is better way to solve this issue?

Thanks,
Tal

@i8wu
Copy link
Contributor

i8wu commented Apr 4, 2017

Tested your solution and it seems to break the draggability of the row item, so this actually isn't a solution. I'll try to take a look since I'm interested too.

@i8wu
Copy link
Contributor

i8wu commented Apr 4, 2017

  _isDisabled() {
      return this.props.disabled ||
        this._isAnimationRunning && this.props.disabledDuringAnimation;
    }

Looks like this.props.disabledDuringAnimation is actually undefined, deleting this allows touchable to receive the touch and doesn't break dragging. @gitim I can submit a PR if you'd like.

@gitim
Copy link
Owner

gitim commented Apr 4, 2017

yes, please

@gitim
Copy link
Owner

gitim commented Apr 4, 2017

published, a new version with fix

@gitim gitim closed this as completed Apr 4, 2017
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

3 participants