materialize-tags icon indicating copy to clipboard operation
materialize-tags copied to clipboard

dropdown is not displaying

Open dineshmaths1 opened this issue 7 years ago • 1 comments

Am trying to implement suggestion api This is my code $('#name').materialtags({ itemValue: 'value', itemText: 'text', typeaheadjs: { name: 'name', displayKey: 'name', source: function(search, showChoices) {

      var a=[];
     $.ajax({
            url: "<?php echo base_url('common/clients'); ?>",
            async: true,
            method: "post",
            dataType:"json",
            data: {name: search},
            success: function(choices) {
               var a=[]
             $.each(choices,function(k,v){
                   var b={};
				b["text"]=v["name"];
				b["value"]=v["name"];
				a.push(b); 
              });
              console.log(a);
             return a;
            }
          });

    }

},
freeInput: false

});

dineshmaths1 avatar Jun 06 '18 06:06 dineshmaths1

Hi,

have you check the examples here

henrychavez avatar Jul 25 '18 03:07 henrychavez