Skip to content

Commit 06e5d3c

Browse files
drillthrough correct handling fix
1 parent 2b52693 commit 06e5d3c

3 files changed

Lines changed: 12 additions & 6 deletions

File tree

source/js/DataController.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ DataController.prototype.getData = function () {
8080

8181
DataController.prototype.setData = function (data) {
8282

83+
var _ = this;
84+
8385
if (!this.isValidData(data)) {
8486
console.error("Invalid data to set.", data);
8587
return;
@@ -91,6 +93,13 @@ DataController.prototype.setData = function (data) {
9193
this.resetConditionalFormatting();
9294
this.resetRawData();
9395

96+
if (data.info.mdxType === "drillthrough") {
97+
this.setDrillThroughHandler(function (params) {
98+
_.controller.pivotView.displayMessage(params["cellData"]["value"] || "", true);
99+
return false;
100+
});
101+
}
102+
94103
this._trigger();
95104
return data;
96105

source/js/DataSource.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ DataSource.prototype.getCurrentData = function (callback) {
161161

162162
var data = ready.data;
163163

164-
console.log("Retrieved data:", ready);
164+
//console.log("Retrieved data:", ready);
165165

166166
if (mdxType === "drillthrough") {
167167
callback((function (data) {
@@ -187,7 +187,8 @@ DataSource.prototype.getCurrentData = function (callback) {
187187
cubeName: "No cube name",
188188
leftHeaderColumnsNumber: 0,
189189
rowCount: arr.length,
190-
topHeaderRowsNumber: headers.length
190+
topHeaderRowsNumber: headers.length,
191+
mdxType: mdxType
191192
}
192193
};
193194

source/js/LightPivotTable.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,10 +210,6 @@ LightPivotTable.prototype.tryDrillThrough = function (filters) {
210210
});
211211
_.dataController.pushData();
212212
_.dataController.setData(data);
213-
_.dataController.setDrillThroughHandler(function (params) {
214-
_.pivotView.displayMessage(params["cellData"]["value"] || "", true);
215-
return false;
216-
});
217213
if (typeof _.CONFIG.triggers["drillThrough"] === "function") {
218214
_.CONFIG.triggers["drillThrough"].call(_, {
219215
level: _.DRILL_LEVEL,

0 commit comments

Comments
 (0)