Skip to content
This repository has been archived by the owner on Apr 21, 2024. It is now read-only.

Commit

Permalink
release 1.0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
cruikshj committed Mar 10, 2016
1 parent d119df7 commit 4fa8c9f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions dist/knockout-select2.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
var allBindings = allBindingsAccessor();
var ignoreChange = false;
var dataChangeHandler = null;
var subscription = null;

$(element).on('select2:selecting select2:unselecting', function() {
ignoreChange = true;
Expand All @@ -44,12 +45,12 @@
});

if (ko.isObservable(allBindings.value)) {
allBindings.value.subscribe(function (value) {
subscription = allBindings.value.subscribe(function (value) {
if (ignoreChange) return;
triggerChangeQuietly(element, this._target || this.target);
});
} else if (ko.isObservable(allBindings.selectedOptions)) {
allBindings.selectedOptions.subscribe(function (value) {
subscription = allBindings.selectedOptions.subscribe(function (value) {
if (ignoreChange) return;
triggerChangeQuietly(element, this._target || this.target);
});
Expand All @@ -76,6 +77,9 @@
if (dataChangeHandler !== null) {
$(element).off('change', dataChangeHandler);
}
if (subscription !== null) {
subscription.dispose();
}
});

}, 0);
Expand Down
2 changes: 1 addition & 1 deletion dist/knockout-select2.min.js

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

2 changes: 1 addition & 1 deletion package.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>knockout-select2</id>
<version>1.0.6</version>
<version>1.0.9</version>
<title>knockout-select2</title>
<authors>John Cruikshank</authors>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
Expand Down

0 comments on commit 4fa8c9f

Please sign in to comment.