Преглед изворни кода

always set the val on element so initSelection has access to it. fixes #337

Igor Vaynberg пре 12 година
родитељ
комит
8bab0b6f70
1 измењених фајлова са 1 додато и 0 уклоњено
  1. 1 0
      select2.js

+ 1 - 0
select2.js

@@ -1691,6 +1691,7 @@
                     this.clear();
                     return;
                 }
+                this.opts.element.val(val);
                 this.opts.initSelection(this.opts.element, function(data){
                     self.opts.element.val(!data ? "" : self.id(data));
                     self.updateSelection(data);