Переглянути джерело

fix initSelection with empty input value

norlin 12 роки тому
батько
коміт
c8cae0a6c9
1 змінених файлів з 1 додано та 0 видалено
  1. 1 0
      select2.js

+ 1 - 0
select2.js

@@ -1805,6 +1805,7 @@ the specific language governing permissions and limitations under the Apache Lic
         initSelection: function () {
             var selected;
             if (this.opts.element.val() === "" && this.opts.element.text() === "") {
+                this.updateSelection([]);
                 this.close();
                 this.setPlaceholder();
             } else {