Skip to content

Commit

Permalink
disable conditional formatting for drillthrough
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitaeverywhere committed Jan 8, 2015
1 parent 3c15380 commit 7f28767
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
4 changes: 3 additions & 1 deletion source/js/LightPivotTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,9 @@ LightPivotTable.prototype.tryDrillThrough = function (filters) {

this.dataSource.getCurrentData(function (data) {
if (_.dataController.isValidData(data) && data.dataArray.length > 0) {
_.pivotView.pushTable();
_.pivotView.pushTable({
disableConditionalFormatting: true
});
_.dataController.pushData();
_.dataController.setData(data);
_.dataController.setDrillThroughHandler(function (params) {
Expand Down
10 changes: 8 additions & 2 deletions source/js/PivotView.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,11 @@ PivotView.prototype._updateTablesPosition = function (seek) {

};

PivotView.prototype.pushTable = function () {
PivotView.prototype.getCurrentTableData = function () {
return this.tablesStack[this.tablesStack.length - 1];
};

PivotView.prototype.pushTable = function (opts) {

var _ = this,
tableElement = document.createElement("div");
Expand All @@ -107,7 +111,8 @@ PivotView.prototype.pushTable = function () {
if (this.tablesStack.length) tableElement.style.left = "100%";

this.tablesStack.push({
element: tableElement
element: tableElement,
opts: opts || {}
});

this.elements.base.appendChild(tableElement);
Expand Down Expand Up @@ -609,6 +614,7 @@ PivotView.prototype.renderRawData = function (data) {
if (
this.controller.CONFIG.conditionalFormattingOn // totals formatting present
&& !(info.SUMMARY_SHOWN && rawData.length - 1 === y) // exclude totals formatting
&& !this.getCurrentTableData().opts.disableConditionalFormatting
) {
this.applyConditionalFormatting(
data["conditionalFormatting"],
Expand Down

0 comments on commit 7f28767

Please sign in to comment.