Skip to content

Commit

Permalink
Merge pull request #83 from jpmorganchase/fix-viewer-aggregates
Browse files Browse the repository at this point in the history
Fix setting the aggregate attribute on perspective-viewer
  • Loading branch information
texodus authored Apr 3, 2018
2 parents 3425dfe + 88e9000 commit c5c151c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/perspective-viewer/src/js/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -748,15 +748,16 @@ registerElement(template, {
*/
aggregates: {
set: function () {
let show = JSON.stringify(this.getAttribute('aggregates'));
let lis = Array.prototype.slice.call(this.querySelectorAll("#side_panel perspective-row"));
let show = JSON.parse(this.getAttribute('aggregates'));
let lis = Array.prototype.slice.call(this.querySelectorAll("#active_columns perspective-row"));
lis.map((x, ix) => {
let agg = show[x.getAttribute('name')];
if (agg) {
x.setAttribute('aggregate', agg);
}
});
this.dispatchEvent(new Event('config-update'));
this._update();
}
},

Expand Down

0 comments on commit c5c151c

Please sign in to comment.