Open pavankakumanu opened 5 years ago
Hi @pavankakumanu
Try change your code to:
Object.defineProperty(Array.prototype, 'uniqueObjects', {
enumerable: false,
value: function (rx) {
var a = this.concat();
for (var i = 0; i < a.length; ++i) {
for (var j = i + 1; j < a.length; ++j) {
if (a[i] === a[j]) {
a.splice(j--, 1);
}
}
}
return a;
}
});
PivotTable.js is amazing library. I really like to include into my project. but we are facing a small issue when we include this array prototype.
i have these lines of code in my _Layout.cshtml Array.prototype.uniqueObjects = function () { var a = this.concat(); for (var i = 0; i < a.length; ++i) { for (var j = i + 1; j < a.length; ++j) { if (a[i] === a[j]) { a.splice(j--, 1); } } } return a; }
some how pivot table picking this logic and showing like bellow image.
but once i comment the above code things working fine. This is one small issue im facing. This info will help you to make this tool more and more grateful.
Thanks