How can I dynamically make a select2 combobox read-only?
Here\'s what I\'ve tried so far:
$(\'...\').attr({\'reado
I'm working with Select 4.0 and this works well for me
$('#select2-element').on('select2:select', () => { $('#select2-element').data('select2').destroy(); $('#select2-element').attr('readonly', true); });