Sfoglia il codice sorgente

Revert "Unselect events: cache lookup key fix (#6179)" (#6217)

This reverts commit d961613058cec3e7b1ee184643b483dc92170e54.
James Addison 2 anni fa
parent
commit
0a186ebb48
1 ha cambiato i file con 1 aggiunte e 6 eliminazioni
  1. 1 6
      src/js/select2/data/select.js

+ 1 - 6
src/js/select2/data/select.js

@@ -114,12 +114,7 @@ define([
     });
 
     container.on('unselect', function (params) {
-      container.$element.find('option').each(function () {
-        if ($(this).val() == params.data.id) {
-          var data = Utils.GetData(this, 'data');
-          self.unselect(data);
-        }
-      });
+      self.unselect(params.data);
     });
   };