$(document).ready(function(){$.fn.select2.amd.require(['select2/selection/search'],function(Search){var oldRemoveChoice=Search.prototype.searchRemoveChoice;Search.prototype.searchRemoveChoice=function(){oldRemoveChoice.apply(this,arguments);this.$search.val('');};});});