Select2 não funciona pesquisa no modal do google chorme

Hello,

I am facing a problem with the Select2 component in my application when using the Google Chrome browser.
Select2’s search functionality is not working correctly when I open a screen in modal,
If it is not modal, the process works correctly.
Below are some details about the issue:

Select2 version: 4.1.0-rc.0

Chrome Version: 127.0.6533.100
Sem título|690x308
print|690x317

1 Like

Hello,

A common solution is to add the dropdownParent option when initializing Select2, to ensure that the dropdown is attached to the modal. Example:

$(document).ready(function() {
    $('#yourSelect').select2({
        dropdownParent: $('#yourModal')
    });
});
1 Like