Skip to content
This repository has been archived by the owner on Feb 4, 2021. It is now read-only.

Checkbox Group returns the previous (not current) array of checked boxes #75

Closed
mileung opened this issue Jun 3, 2016 · 4 comments
Closed

Comments

@mileung
Copy link

mileung commented Jun 3, 2016

For example if you first check the first box

onSelect={(value) => {
            console.log('value', value);
          }}

will print out "value []"

And if you uncheck the box "value [0]" will be printed out

@mileung
Copy link
Author

mileung commented Jun 4, 2016

the selected array is updated after the callback is called

@cldwalker
Copy link
Contributor

I'm also seeing this bug with 0.3.6 and RN 0.26.0. I don't think I was seeing this bug when using 0.3.3 and RN 0.24.0

@cldwalker
Copy link
Contributor

@mileung I put up a fix in #76. If you'd like to try the fix, update your package.json: "react-native-material-design": "git://github.com/cldwalker/react-native-material-design#fix-checkbox-group-on-select"

@Ehesp Ehesp closed this as completed in e904bec Jun 6, 2016
Ehesp added a commit that referenced this issue Jun 6, 2016
Fix CheckGroup onSelect to return latest checked state - fixes #75
@mileung
Copy link
Author

mileung commented Jun 7, 2016

Somewhat unrelated question, but how did you create that url ("git://github.com/cldwalker/react-native-material-design#fix-checkbox-group-on-select") that has your forked repo with the fixes? I would like to add some additional fixes

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants