Browse Source

fix triggering of unwated change. #824

Igor Vaynberg 12 năm trước cách đây
mục cha
commit
d04d127cab
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      select2.js

+ 3 - 1
select2.js

@@ -1855,7 +1855,9 @@ the specific language governing permissions and limitations under the Apache Lic
                     self.opts.element.val(!data ? "" : self.id(data));
                     self.updateSelection(data);
                     self.setPlaceholder();
-                    self.triggerChange();
+                    if (triggerChange) {
+                        self.triggerChange();
+                    }
                 });
             }
         },