Przeglądaj źródła

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

This reverts commit d961613058cec3e7b1ee184643b483dc92170e54.
James Addison 2 lat temu
rodzic
commit
0a186ebb48
1 zmienionych plików z 1 dodań i 6 usunięć
  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);
     });
   };