primefaces / primeui

Rich set of javascript-css only widgets
http://www.primefaces.org/primeui
278 stars 125 forks source link

puiautocomplete [object object] #242

Open CODEheures opened 8 years ago

CODEheures commented 8 years ago

when array is object [{label: lorem, value:1}] puiautocomplete find [object object]

In function puiautocomplete method search I change line 777 on v4.1.9: data.push({label:sourceArr[i], value: item}); becomes: data.push({label:itemLabel, value: item.value});

I took advantage of this change to change the filter also extend line 776 on v4.19: if(emptyQuery||itemLabel.indexOf(this.query) === 0) { becomes: if(emptyQuery||itemLabel.indexOf(this.query) >= 0) {