Select2 PHP search does not work

1

Hello good day I'm using the js select2 to fill a combo, I managed to fill it but the search now does not work for any character.

This is my code js

$(document).ready(function(){ 
// $('#panel_mantenimiento').hide();
$('#reg_id').select2({
    ajax: {
        url: '../ajax/region.php?op=region_listar_combo',
        dataType: 'json',
        delay: 250,
        data: function(params) {
            return {
                q: params.term,
                page: params.page
              };
        },
        processResults: function (data) {
            return {
                results: data
            };
        },
    }
  });

});

    
asked by Davis Anderson 31.03.2018 в 23:01
source

0 answers