instacart / Snacks

The Instacart Component Library
https://instacart.github.io/Snacks/
Apache License 2.0
81 stars 36 forks source link

Checkbox checked state isn't reflecting checked state as expected #416

Open elliott-joo opened 4 years ago

elliott-joo commented 4 years ago

When creating a checkbox with the isSelected prop, I'm expecting it to be the single source of truth, but it seems that the checkbox has its own local state, that toggles the checked state.

To replicate:

Not sure if this is as intended, but it gets in the way when we don't want the checkbox to behave on its own, such as when the checkbox checked state shouldn't occur until a popup is confirmed.