Skip to content

Commit

Permalink
Merge pull request #24 from grgcnnr/master
Browse files Browse the repository at this point in the history
Fire A change event when DDF tampers with available options.
  • Loading branch information
sheadawson authored Mar 20, 2017
2 parents ac484ef + 0eb28a6 commit 108adf3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions javascript/dependentdropdownfield.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
jQuery.entwine("dependentdropdown", function ($) {

$(":input.dependent-dropdown").entwine({
onadd: function () {
onmatch: function () {
var drop = this;
var depends = ($(":input[name=" + drop.data('depends').replace(/[#;&,.+*~':"!^$[\]()=>|\/]/g, "\\$&") + "]"));

Expand All @@ -26,7 +26,7 @@ jQuery.entwine("dependentdropdown", function ($) {
$.each(data, function () {
drop.append($("<option />").val(this.k).text(this.v));
});
drop.trigger("liszt:updated").trigger("chosen:updated");
drop.trigger("liszt:updated").trigger("chosen:updated").trigger("change");
});
}
});
Expand Down

0 comments on commit 108adf3

Please sign in to comment.