Button fires on swiping
Arcalise08 opened this issue · 4 comments
Love this repo but and have used it quite a lot. Thanks for the time and effort for putting it together!
Big issue though! It seems to work fine within the bounds of a View, (Mostly because you arent swiping up or down in a view)
But you place it within a ScrollView and youll see it fires everytime you try to swipe up or down and accidently hit it. Native buttons dont fire like that and has caused great annoyance to many of my users. Currently investigating a fix and will report back if i should find one.
Hey there guys! This seems like a dead repo! I just thought you guys would want to know I did fix many of its various problems including the ones I mentioned here and several mentioned throughout the repo. I went ahead and updated with the new pressable component in react native as well.
Heres the fork. Enjoy!
Any further issues i have no problem taking a look at it, as i'm using this in my active projects so it'll be good to figure out issues before they arise!
Hey guys one last mention! You have to be running react native 0.63 (the newest version) to use my fork! You will get errors if you dont!!
If you cant use RN .63 you can always fork my release and change the component back to TouchableWithoutFeedback, It works. ALMOST just as well. Just some bugfixes that were never sorted out with that one.
I fixed that problem without any forks.
If you do not need onPress prop on AwesomeButton, You can handle onPress on TouchableOpacity and wrap that one in it.
for example:
<TouchableOpacity onPress={() => {
// your code here
}}>
<AwesomeButton>
{/* your code here */}
</AwesomeButton>
</TouchableOpacity>
I fixed that problem without any forks.
If you do not need onPress prop on AwesomeButton, You can handle onPress on TouchableOpacity and wrap that one in it.
for example:
<TouchableOpacity onPress={() => { // your code here }}> <AwesomeButton> {/* your code here */} </AwesomeButton> </TouchableOpacity>
That isn't a fix. Its a workaround. Awesome button also utilizes as touchablewithoutfeedback so at best that workaround is doubling the listeners for every button. I wouldn't advise it personally as it's not a very clean solution. But to each their own. I'm closing this issue now as there is both a fix(using the fork) and a workaround available.
Have a great day!