DEV Community

mhsohag11
mhsohag11

Posted on

Answer: How make select2 placeholder for search input

Use event select2:open.

$('#mySelect').select2().on('select2:open', function(e){
    $('.select2-search__field').attr('placeholder', 'your placeholder');
})

Discussion (0)