diff --git a/ci4/app/Views/themes/_commonPartialsBs/select2bs5.php b/ci4/app/Views/themes/_commonPartialsBs/select2bs5.php index c5afb660..fa722685 100644 --- a/ci4/app/Views/themes/_commonPartialsBs/select2bs5.php +++ b/ci4/app/Views/themes/_commonPartialsBs/select2bs5.php @@ -1,19 +1,27 @@ section('css') ?> - - + endSection() ?> section('additionalExternalJs') ?> - + endSection() ?> section('additionalInlineJs') ?> - - $('.select2bs').select2({ - theme: "bootstrap-5", - allowClear: false, + + const select2 = $('.select2'); + + // Select2 + // -------------------------------------------------------------------- + if (select2.length) { + select2.each(function () { + var $this = $(this); + $this.wrap('
').select2({ + placeholder: 'Select value', + dropdownParent: $this.parent() + }); }); + } -endSection() ?> \ No newline at end of file +endSection() ?>