Browse Source

Merge pull request #1627 from mktm/next

Dropdown module (restore)
pull/1629/merge
Jack Lukic 9 years ago
parent
commit
a7f08d6a78
1 changed files with 10 additions and 2 deletions
  1. 12
      src/definitions/modules/dropdown.js

12
src/definitions/modules/dropdown.js

@ -900,6 +900,7 @@ $.fn.dropdown = function(parameters) {
;
module.debug('Restoring default text', defaultText);
module.set.text(defaultText);
$text.addClass(settings.className.placeholder);
},
defaultValue: function() {
var
@ -907,8 +908,15 @@ $.fn.dropdown = function(parameters) {
;
if(defaultValue !== undefined) {
module.debug('Restoring default value', defaultValue);
module.set.selected(defaultValue);
module.set.value(defaultValue);
if (defaultValue.length) {
module.set.selected(defaultValue);
module.set.value(defaultValue);
}
else {
module.remove.activeItem();
module.remove.selectedItem();
}
}
}
},

Loading…
Cancel
Save