Skip to content

Commit 3822bd8

Browse files
fix drillthrough/drilldown with filters
1 parent 7dba153 commit 3822bd8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

source/js/LightPivotTable.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ LightPivotTable.prototype.dataChangeTrigger = function () {
101101
LightPivotTable.prototype.tryDrillDown = function (filter) {
102102

103103
var _ = this,
104+
oldDataSource,
104105
ds = {};
105106

106107
// clone dataSource config object
@@ -114,8 +115,12 @@ LightPivotTable.prototype.tryDrillDown = function (filter) {
114115
ds.basicMDX = this.mdxParser.drillDown(this.dataSource.BASIC_MDX, filter) || this.dataSource.BASIC_MDX;
115116
}
116117

118+
oldDataSource = this.dataSource;
119+
117120
this.pushDataSource(ds);
118121

122+
this.dataSource.FILTERS = oldDataSource.FILTERS;
123+
119124
this.dataSource.getCurrentData(function (data) {
120125
if (_.dataController.isValidData(data) && data.dataArray.length > 0) {
121126
_.pivotView.pushTable();
@@ -134,6 +139,7 @@ LightPivotTable.prototype.tryDrillDown = function (filter) {
134139
LightPivotTable.prototype.showDrillThrough = function (filters) {
135140

136141
var _ = this,
142+
oldDataSource,
137143
ds = {};
138144

139145
// clone dataSource config object
@@ -148,8 +154,12 @@ LightPivotTable.prototype.showDrillThrough = function (filters) {
148154
ds.basicMDX = this.mdxParser.drillThrough(ds.basicMDX) || ds.basicMDX;
149155
}
150156

157+
oldDataSource = this.dataSource;
158+
151159
this.pushDataSource(ds);
152160

161+
this.dataSource.FILTERS = oldDataSource.FILTERS;
162+
153163
this.dataSource.getCurrentData(function (data) {
154164
if (_.dataController.isValidData(data) && data.dataArray.length > 0) {
155165
_.pivotView.pushTable();

0 commit comments

Comments
 (0)