xxxxxxxxxx
Step 1. Give id to the option that you want to hide from the list of options.
<option value="" id="elemID">Label</option>
Step 2. Add templateResult option inisde select2 as shown below:
$("#example").select2({
templateResult: function(option, container) {
if ($(option.element).attr("id") == "elemID"){
$(container).css("display","none");
}
return option.text;
}
});
xxxxxxxxxx
.select2-container--default .select2-results__option[aria-disabled=true] {
display: none;
}