smooth-code / smooth-ui

Modern React UI library 💅👩‍🎤🍭
MIT License
1.59k stars 101 forks source link

Unable to use the Space key to toggle values in Checkbox and Radio components #169

Open ividic opened 4 years ago

ividic commented 4 years ago

🐛 Bug Report

While it works in the Reakit Checkbox component, using the Space key to toggle the value in Checkbox/Radio doesn't work unless it's wrapped in a FormCheckLabel component. Using htmlFor doesn't work either.

Expected behavior

Toggle Checkbox/Radio value by pressing Space

Link to repl or repo (highly encouraged)

https://codesandbox.io/s/crazy-mcclintock-84ub3 - index.html and radio.html

gregberge commented 4 years ago

Hello @ividic, it is a bug. I don't have time to fix it, any PR welcome.