GeekyAnts / NativeBase

Mobile-first, accessible components for React Native & Web to build consistent UI across Android, iOS and Web.
https://nativebase.io/
MIT License
20.21k stars 2.39k forks source link

CheckBox.Group bugs #5073

Open btrewern opened 2 years ago

btrewern commented 2 years ago

Description

Check boxes change randomly when in a CheckBox.Group

CodeSandbox/Snack link

See document examples

Steps to reproduce

Loading either CheckBox.Group examples:

https://docs.nativebase.io/checkbox#h3-controlled or https://docs.nativebase.io/checkbox#h3-uncontrolled

the check boxes don't work as expected. The first select click works but after that check boxes seem to change at random.

Also when running locally these examples raise a Console Warning as follows:

"We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"

NativeBase Version

3.4.6

Platform

Other Platform

No response

Additional Information

No response

Krithikj20 commented 2 years ago

Hi @btrewern, Thank you for reporting this issue. We will look into it.

chornos13 commented 2 years ago

Yeah, I experienced the same. this is major bug because the Component not updated when trigger by HMR

Viraj-10 commented 2 years ago

Hi @chornos13, this issue is fixed in V3.3.12. We are upgrading the native-base version in docs. issue link https://github.com/GeekyAnts/NativeBase/issues/4660

ttessman commented 2 years ago

Still see the warning in 3.4.13

image
guidoabelleira commented 2 years ago

I have the same problem in "native-base": "^3.4.6".

Todavía veo la advertencia en 3.4.13

imagen

did you find a solution?

Logro resolver?

mlab817 commented 1 year ago

well, i still have the problem.

sahilvasuja commented 1 year ago

For now, you can try this one checkbox group

hananiradzi commented 1 year ago

Still have same issue with latest version. 3.4.25

garrettg123 commented 1 year ago

Still an issue in 3.4.28

kokosky93 commented 1 year ago

same problem

mayying commented 1 year ago

same issue - "native-base": "~3.4.28",

kokosky93 commented 1 year ago

guys how did you solve the problem?

I have no idea how to solve it nothing is working no matter whether is it a simple checkbox or a group of checkboxes.

It is randomly checking checkboxes. I don't know what has changed because there was no update this package last 6 months

ntrphongse commented 1 year ago

For some who are suffering this problem, I found out the the issue was mentioned and solved here at https://github.com/GeekyAnts/NativeBase/issues/5098#issuecomment-1579910908

They fixed it in https://github.com/GeekyAnts/NativeBase/pull/5686 but I don't know why it returned to the buggy version (maybe in https://github.com/GeekyAnts/NativeBase/pull/5702)

Native-base team please have a look!

jy1989 commented 1 year ago

so long time, same bug we facing "native-base": "^3.4.28", "react-native": "0.72.4",

meypod commented 8 months ago

I was able to workaround the issue by wrapping the checkbox with a Pressable, added pointerEvents='none' around the checkbox, stopped using the checkbox or checkbox group's onChange. and toggled the value of checkbox by the Pressable's onPress. I could not use the isChecked property, so I continued to use checkbox group and the value prop.

I hope this helps somebody out there looking for a workaround.

agnieszka-wojcik-dev commented 3 months ago

guys how did you solve the problem?

I have no idea how to solve it nothing is working no matter whether is it a simple checkbox or a group of checkboxes.

It is randomly checking checkboxes. I don't know what has changed because there was no update this package last 6 months

I solved this problem by changing value={someValue} to defaultValue={someValue} in native-base 3.4.28