DesignRevision / shards-react

⚛️A beautiful and modern React design system.
https://designrevision.com/downloads/shards-react/
MIT License
762 stars 98 forks source link

There is no generic way of handling toggle change event #26

Open vicmosin opened 5 years ago

vicmosin commented 5 years ago

Checkbox in toggle mode sends its label element as event.targetto change handler method instead of actual input="checkbox" and therefor there is no way of determine current value of the toggle. As a result, each toggle at the form needs to have its own on-change handler which update exclusively its own state -> produces too much boiler-plate code