Просмотр исходного кода

fix: restored previous behavior of form_dropdown, this fixes all my observerd bugs with the dropdown behavior

Torkel Ödegaard 8 лет назад
Родитель
Сommit
38f4d5d06d
1 измененных файлов с 2 добавлено и 4 удалено
  1. 2 4
      public/app/core/components/form_dropdown/form_dropdown.ts

+ 2 - 4
public/app/core/components/form_dropdown/form_dropdown.ts

@@ -176,7 +176,7 @@ export class FormDropdownCtrl {
   updateValue(text) {
     text = _.unescape(text);
 
-    if ((!this.allowCustom && text === '') || this.text === text) {
+    if (text === '' || this.text === text) {
       return;
     }
 
@@ -225,9 +225,7 @@ export class FormDropdownCtrl {
 
     var typeahead = this.inputElement.data('typeahead');
     if (typeahead) {
-      if (!this.allowCustom) {
-        this.inputElement.val('');
-      }
+      this.inputElement.val('');
       typeahead.lookup();
     }
   }