Skip to content

Commit

Permalink
Fixing that multiple-select dropdown wouldn't stay open, fixes #139 #143
Browse files Browse the repository at this point in the history
  • Loading branch information
erik-krogh committed Apr 20, 2016
1 parent f6386e8 commit 81205fc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/angular-materialize.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
(function (angular) {
var undefined;
angular.module("ui.materialize", ["ui.materialize.ngModel", "ui.materialize.collapsible", "ui.materialize.toast", "ui.materialize.sidenav", "ui.materialize.material_select", "ui.materialize.dropdown", "ui.materialize.inputfield", "ui.materialize.input_date", "ui.materialize.tabs", "ui.materialize.pagination", "ui.materialize.pushpin", "ui.materialize.scrollspy", "ui.materialize.parallax","ui.materialize.modal", "ui.materialize.tooltipped", "ui.materialize.slider", "ui.materialize.materialboxed", "ui.materialize.scrollFire", "ui.materialize.nouislider"]);

/* example usage:
Expand Down Expand Up @@ -278,6 +279,12 @@
return;
}
}
if (newVal !== undefined && element.siblings("ul.active").length) { // If select is open
var selectedOptions = element.siblings("ul.active").children("li.active").length; // Number of selected elements
if (selectedOptions == newVal.length) {
return;
}
}
}
element.siblings(".caret").remove();
scope.$evalAsync(function() {
Expand Down

0 comments on commit 81205fc

Please sign in to comment.