switchery
switchery copied to clipboard
Added onChange method to options
Just added a simple onChange option, as I needed it in my project.
Few things:
-
dist/
is not the proper place to add those changes to. You should useswitchery.js
instead. The files in thedist/
folder are auto-generated - check out the Readme to find how to do this. - this should better go in
handleOnchange()
method - fix your indentation
-
onChange
option could be renamed to something likechangeCallback
First 3 are strong advices, can't merge this without it happening the proper way. The last - I'm not really sure about it, I'm trying to come up with a better name, onChange
just doesn't sound right for some reason, feel free to change this to something even better.