document.addEventListener("livewire:load", disableSelect2Scroll);
document.addEventListener("livewire:update", disableSelect2Scroll);

function disableSelect2Scroll() {
    $(document).on("select2:open", function (e) {
        const evt = "scroll.select2";
        $(e.target).parents().off(evt);
        $(window).off(evt);
    });
}
