primefaces / primeui

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

Error when trying to filter or sort a column in dataTable #202

Closed consu3sg closed 8 years ago

consu3sg commented 8 years ago

When I try to sort or filter a column i get the following error: "Uncaught TypeError: Cannot read property 'update' of undefined" untitled

cagataycivici commented 8 years ago

Can you please provide your sample code? Which version do you have?

consu3sg commented 8 years ago

I've just found out what was going on ! The problem has nothing to do with PrimeUI. The problem was the prototype I created in my js file:

The prototype was Array.prototype.removeDuplicated = function () { var seen = {}; var out = []; var len = this.length; var j = 0; for (var i = 0; i < len; i++) { var item = this[i]; if (seen[item] !== 1) { seen[item] = 1; out[j++] = item; } } return out; };

I decided to remove it !

Thanks for your attention !

cagataycivici commented 8 years ago

Thank you for the update.