react-native-bouncy-checkbox icon indicating copy to clipboard operation
react-native-bouncy-checkbox copied to clipboard

Enable checkbox by reference doesn't work

Open vitorgabs opened this issue 3 years ago • 4 comments
trafficstars

Trying to activate the checkbox by reference an error occurs, is informed that the onPress method does not exist. 1a846968-4639-43f7-aba6-6666b06773b9

vitorgabs avatar Aug 10 '22 18:08 vitorgabs

Did you find a solution?

PopJoestar avatar Aug 18 '22 05:08 PopJoestar

I will take a look at this today, thank you for reporting this @VitorGabs Sorry for late response tho

WrathChaos avatar Aug 18 '22 07:08 WrathChaos

Yeah I keep getting same error using expo with JS, could it be a problem with using JS instead of TS?

KacperHemperek avatar Sep 30 '22 08:09 KacperHemperek

This is probably an expo issue, I never use expo so I never get the error itself since I use this library all of my real products.

I will try to reproduce it on expo project.

If anyone can share with me a reproducible example, It will save tons of time :)

WrathChaos avatar Sep 30 '22 09:09 WrathChaos

onPress is no longer a method

itsramiel avatar Nov 10 '22 17:11 itsramiel

What do you mean? What should we use instead of it?

WrathChaos avatar Nov 11 '22 14:11 WrathChaos

From the source code, I can see that you can still pass onPress as a prop, but you can not invoke onPress on the ref of BouncyCheckbox. I see there is a handleCheck, which you invoke but the bounciness effect will not trigger.

Arent you the maintainer of the package? You should know that already.

itsramiel avatar Nov 11 '22 14:11 itsramiel

You can downgrade to the version that used to support onPress or you can rewrite the logic.

I simply stopped depending on the package

itsramiel avatar Nov 11 '22 14:11 itsramiel

You're totally right @itsramiel @VitorGabs, @KacperHemperek, @PopJoestar,

Complete my bad, while re-writing version 3, I totally forgot about the synthetic onPress with the Release 3.0.6. You can use synthetic onPress now.

For now, this is just a hotfix. It works without any problem but there is no bounce effect. I will make it work when I can spare some time on it :)

You can downgrade to the version that used to support onPress or you can rewrite the logic.

I simply stopped depending on the package

@itsramiel, I am sorry to hear that you stopped using this package. I hope you will try it again and please consider contribute the open source project since it seems that you have enough knowledge to fix this issue and open a PR and it has much more impact than quitting an open source library :)

I try to maintain more than 100+ libraries and from time to time make mistakes and could not spend enough time since I am working on these projects in my free time and without any salary. So, I hope you want to contribute to more projects instead of quitting them :)

Thank you for making the comments to fix the issue :)

WrathChaos avatar Nov 11 '22 17:11 WrathChaos