From ea4eb8218fcb3cfd0818492822906264595550dd Mon Sep 17 00:00:00 2001 From: idanstark42 Date: Sun, 27 Oct 2019 00:19:53 +0300 Subject: [PATCH] Allowing `undefined` value to clear dropdown. When setting the value of the dropdown to `undefined`, it should reset as well, not only when it's `null`. --- src/dropdown/sm-dropdown.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dropdown/sm-dropdown.js b/src/dropdown/sm-dropdown.js index 346958f..4b2041d 100644 --- a/src/dropdown/sm-dropdown.js +++ b/src/dropdown/sm-dropdown.js @@ -162,7 +162,7 @@ return function (scope, element, attributes) { var applyValue = function (value) { $timeout(function () { - if (value === null) { + if (value == null) { element.dropdown('clear'); } else if(value === false){ // Do nothing