Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added onChange method to options #49

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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