Skip to content

Added onChange method to options#49

Open
jezzdk wants to merge 1 commit intoabpetkov:masterfrom
CoolGray:master
Open

Added onChange method to options#49
jezzdk wants to merge 1 commit intoabpetkov:masterfrom
CoolGray:master

Conversation

@jezzdk
Copy link

@jezzdk jezzdk commented Nov 19, 2014

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

@abpetkov
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments