Skip to content

Commit

Permalink
fix(dropdown): dont trigger onchange event on initiaload when values …
Browse files Browse the repository at this point in the history
…are given

When values are given on initialization of a dropdown, all entries which have a selected attribute set will trigger the onChange event

The already existing fireOnChange setting does not cover this situation to prevent the callback.
In comparison: When a dropdown is just converted from a select and those option values do also have the selected property set, then the onchange does not happen, so the behavior does not match, but should.
  • Loading branch information
lubber-de authored May 20, 2020
1 parent 4929629 commit 544caec
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/definitions/modules/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ $.fn.dropdown = function(parameters) {
module.setup.layout();

if(settings.values) {
module.set.initialLoad();
module.change.values(settings.values);
module.remove.initialLoad();
}

module.refreshData();
Expand Down

0 comments on commit 544caec

Please sign in to comment.