I have select2 multi select field in my form where I want to remove the selected option from the dropdown list after it is selected and again add it to the list if it is removed
$(document).ready(function(){
$('#dynamicAttributes').select2({
allowClear: true,
minimumResultsForSearch: -1,
width: 600
});
});
this make a error when click the remove sign button
TypeError: this.placeholder is undefined
use
$(document).ready(function(){
$('#dynamicAttributes').select2({
allowClear: true,
minimumResultsForSearch: -1,
width: 600,
placeholder: 'past your placeholder'
});
});