You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using reactackle-checkbox in combination with mobx-react-form.
Mobx-react-form magically binds its own onChange handler to the inputs.
It expects the parameter to be just the value of the input. i.e. onChange (value) { .... }
In case of reactackle checkbox it calls the function with an object {value: checked}.
This leads to inconvenience in handling the form, since we have to add an extra line of code for each checkbox to read its value.
Is there a reason that props.onChange is called with an object?
Is it possible to add a change to improve this in the next major release?
I am using reactackle-checkbox in combination with mobx-react-form.
Mobx-react-form magically binds its own
onChange
handler to the inputs.It expects the parameter to be just the value of the input. i.e.
onChange (value) { .... }
In case of reactackle checkbox it calls the function with an object
{value: checked}
.This leads to inconvenience in handling the form, since we have to add an extra line of code for each checkbox to read its value.
Is there a reason that props.onChange is called with an object?
Is it possible to add a change to improve this in the next major release?
https://github.com/bcrumbs/reactackle/blob/master/packages/reactackle-checkbox/src/Checkbox.js#L108-L118
The text was updated successfully, but these errors were encountered: