react-native-check-box icon indicating copy to clipboard operation
react-native-check-box copied to clipboard

Checkbox state change

Open reactnativedeveloper opened this issue 7 years ago • 4 comments

I am designing filter page like shopping sites where i need multiple check boxes corresponding to different categories.

Everything is working fine, but when i am de-selecting any checkbox in particular category on particular index then the same change is reflecting on another category. I just want that whenever i should select any checkbox in particular category the same will not reflect on another category.

Below is the screenshot attached for the same.

I tried lots of solution to the problem but nothing is working for me ;'(

screenshot_1495016223 screenshot_1495016221 screenshot_1495016213 screenshot_1495016208

reactnativedeveloper avatar May 17 '17 10:05 reactnativedeveloper

My guess is that when you switch category the checkbox components are not being unmounted but instead they are being re-rendered with a new label

  1. Are you using the latest code and setting checked for each checkbox or relying on the internal state of the checkbox?
  2. Are you rendering the checkboxes as an array? If so are you setting a unique key such as the label?

ianhowe76 avatar May 19 '17 03:05 ianhowe76

@ianhowe76 Yes, i am using latest code. I am using listview for multiple check boxes and its label.

reactnativedeveloper avatar May 22 '17 07:05 reactnativedeveloper

Having the same problem

FlaviooLima avatar Jan 15 '18 18:01 FlaviooLima

Found that I had my view receiving props and refreshing, and when this happens the component start to "mal function".

FlaviooLima avatar Jan 15 '18 18:01 FlaviooLima