Select2 does not select

1

Using the select2 plugin via json I can not select any results. When you select it it does not display the result. Am I doing something wrong?

        $(".PessoaTipo").select2({
            language: "pt-BR",
            placeholder: "Pessoa Tipo",
            allowClear: true,
            minimumInputLength: 0,
            ajax:{
                url: base_url("system_data/pessoaTipo"),
                type: "post",
                dataType: "json",
                delay: 150,
                data: function(params){
                    return{
                        text: params.term
                    };
                },
                processResults: function(data, params){
                    params.page = params.page || 1;     
                    return{
                        results: data,
                        pagination:{
                            more: (params.page * 30) < data.total_count
                        }
                    };
                },
                cache: true
            }
        });

       <label class="lbPessoaTipo">Tipo</lab[![inserir a descrição da imagem aqui][1]][1]el>
       <div class="select2 PessoaTipo"></div>
    
asked by anonymous 29.02.2016 / 02:39

0 answers