Skip to content

Commit

Permalink
Add onReady option
Browse files Browse the repository at this point in the history
Closes #25
  • Loading branch information
Nick Hwang committed Jun 26, 2015
1 parent 5da4fa0 commit 4b1528d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 9 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v1.2.0
- Prevent `triggerChange` if value hasn't changed
- Add `onReady` option for when `Select` is finished initializing

## v1.0.0
- Bump `Tether` to v1

Expand Down
4 changes: 4 additions & 0 deletions dist/js/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ var Select = (function (_Evented) {
this.bindMutationEvents();

this.value = this.select.value;

if (typeof this.options.onReady === 'function') {
this.options.onReady(this);
}
}

_inherits(Select, _Evented);
Expand Down
2 changes: 1 addition & 1 deletion dist/js/select.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4b1528d

Please sign in to comment.