Skip to content

Commit

Permalink
fix a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Haixing-Hu committed Dec 13, 2016
1 parent 2056090 commit 6bdc217
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vue-select",
"description": "A Vue.js component implementing the select control with the jQuery select2 plugin.",
"version": "0.3.0",
"version": "0.3.1",
"keywords": [
"Vue.js",
"component",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vue-select2",
"description": "A Vue.js component implementing the select control with the jQuery select2 plugin.",
"version": "0.3.0",
"version": "0.3.1",
"author": {
"name": "Haixing Hu",
"email": "starfish.hu@gmail.com"
Expand Down
3 changes: 3 additions & 0 deletions src/vue-select.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ module.exports = {
this.control.removeData("data"); // remove the cached options data
// note that setting the model will automatically changed in the "change"
// event of the select2 control
this.isChanging = true;
this.model = newValue;
this.control.val(newValue).trigger("change");
this.isChanging = false;
},
"model": function(val, oldVal) {
//console.debug("model.change");
Expand Down

0 comments on commit 6bdc217

Please sign in to comment.