Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checkbox component does not handle getValue properly #56

Closed
joshuamanns opened this issue Apr 17, 2017 · 5 comments
Closed

Checkbox component does not handle getValue properly #56

joshuamanns opened this issue Apr 17, 2017 · 5 comments

Comments

@joshuamanns
Copy link

I'm unable to create a controlled checkbox using any approach....
Setting the checked property does nothing.
Setting the value property does nothing.
Setting defaultChecked conflicts with controlled/uncontrolled react requirements.

The only solution I've found is modifying the source so that line 47: checked: getValue(false), is changed to checked: getValue(), and managing the Checkbox's checked prop with state and an onChange handler.

@joshuamanns
Copy link
Author

@tannerlinsley I'm getting mixed results here. If I double click the checkbox it will sometimes toggle, but otherwise it does not function... Could you please advise on why this is not behaving as expected? Are there known compatibility issues with other libraries/dependencies? It appears to only happen within the context of my project, even when copy/pasting your storybook code verbatim.

@tannerlinsley
Copy link
Collaborator

I will take a look at this tomorrow morning as I run through issues :)

@joshuamanns
Copy link
Author

@tannerlinsley After some cursory glances, it looks like your library might take issue with Fastclick's synthetic events. It's strange, because this shouldn't be an issue on Desktop where I'm experiencing the problem. Do you have any insight here?

@bruceharris
Copy link
Contributor

@joshuamanns @tannerlinsley I'm experiencing similar trouble; any update on this issue? thanks

@tannerlinsley
Copy link
Collaborator

I've added fast click to the documentation and it seems to be working just fine :)

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

No branches or pull requests

3 participants