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