Kaynağa Gözat

Removing the double event binding registration of "selection:update" within SingleSelection.prototype to prevent multiple calls on the selection event (#4306)

alexweissman 7 yıl önce
ebeveyn
işleme
20429201c8
2 değiştirilmiş dosya ile 1 ekleme ve 4 silme
  1. 1 0
      CHANGELOG.md
  2. 0 4
      src/js/select2/selection/single.js

+ 1 - 0
CHANGELOG.md

@@ -13,6 +13,7 @@
 - User-defined types not normalized properly when passed in as data (#4632)
 - Perform deep merge for `Defaults.set()` (#4364)
 - Fix "the results could not be loaded" displaying during AJAX request (#4356)
+- Removing the double event binding registration of `selection:update` (#4306)
 
 #### Accessibility
 - Improve `.select2-hidden-accessible` (#4908)

+ 0 - 4
src/js/select2/selection/single.js

@@ -62,10 +62,6 @@ define([
         self.$selection.focus();
       }
     });
-
-    container.on('selection:update', function (params) {
-      self.update(params.data);
-    });
   };
 
   SingleSelection.prototype.clear = function () {