1

how can i access the selected item in pui-autocomplete, load of array is working but on select i am not able to use 'item' since i dont know how to use the selected item my array contains strings...

     $('#basic').puiautocomplete({  
        effect: 'fade',
        effectSpeed: 'fast',
        forceSelection: false,
        delay: 100,
        completeSource: references,
       select: function(event, item) {
         console.log(item); // getting this response: jQuery.fn.jQuery.init[1]
       }

    });  

typeof(item) is object not string. So how can i use the value of my selected item. Thaks for help.

user2702379
  • 285
  • 1
  • 3
  • 9

1 Answers1

0

If you want to access the value of the item use item.text()

Like this:

console.log(item.text());
Daniel
  • 36,833
  • 10
  • 119
  • 200