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

Allow custom render item to wrap touchable component #115

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

avertin
Copy link
Contributor

@avertin avertin commented Feb 4, 2021

This library wraps all items that it renders in a TouchableOpacity. This is a problem if you want to use your own custom Touchable component. With the current implementation, the items are be double wrapped in Touchable components so the custom Touchable component never gets press events.

This change adds a new prop called dontWrapItems. If this is set to true, then the library will not wrap the items in a Touchable component and instead expect the renderItem component to handle the wrapping itself. To get everything to wire up, the library will need to pass delayLongPress, onPressOut, and onPressOut to the custom Touchable via a callback in renderItem.

If the maintainer is onboard with this change, I am happy to update the readme with this info as well.

Originally written by @aarondail

Also requested by @sirajalam049 - issue #109

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.

None yet

1 participant