switchery icon indicating copy to clipboard operation
switchery copied to clipboard

Added onChange method to options

Open jezzdk opened this issue 10 years ago • 1 comments

Just added a simple onChange option, as I needed it in my project.

jezzdk avatar Nov 19 '14 08:11 jezzdk

Few things:

  • dist/ is not the proper place to add those changes to. You should use switchery.js instead. The files in the dist/ 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 like changeCallback

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.

abpetkov avatar Nov 28 '14 12:11 abpetkov