minimumInputLength not working properly

Hi,
I have this code:

$('#searchComponent').select2({
        'language': 'es',
        'placeholder': 'Comience a escribir el nombre o apellido',
        'width': 'element',
        'ajax': {
            url: function(params) {
                if ($('#searchOptionProsker').is(':checked')) {
                    return Routing.generate('search_proskers');
                } else {
                    return Routing.generate('search_categories');
                }
            },
            dataType: 'json',
            minimumInputLength: 3
        }
    });

when a type first letter, it’ is fire a search.

You used it into the ajax.
change it to this:

$('#searchComponent').select2({
        'language': 'es',
        'placeholder': 'Comience a escribir el nombre o apellido',
        'width': 'element',
        minimumInputLength: 3
        'ajax': {
            url: function(params) {
                if ($('#searchOptionProsker').is(':checked')) {
                    return Routing.generate('search_proskers');
                } else {
                    return Routing.generate('search_categories');
                }
            },
            dataType: 'json',
            
        }
    });