small fix
This commit is contained in:
parent
9531c0f0e1
commit
c3cf83c57f
|
@ -813,13 +813,12 @@
|
|||
$('.select2').each(function () {
|
||||
const data = $(this).data('value');
|
||||
if (data) {
|
||||
console.log($(this))
|
||||
$(this).select2({
|
||||
data: data,
|
||||
multiple: true,
|
||||
width: '100%'
|
||||
}).val(data.map(i => i.id)).trigger('change');
|
||||
} else {
|
||||
$(this).select2({ multiple: true, width: '100%' });
|
||||
}
|
||||
});
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in New Issue