File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -151,13 +151,16 @@ LightPivotTable.prototype.pushDataSource = function (config) {
151
151
152
152
} ;
153
153
154
- LightPivotTable . prototype . popDataSource = function ( ) {
154
+ /**
155
+ * @param {boolean } [popData = true] - Also pop data in dataSource.
156
+ */
157
+ LightPivotTable . prototype . popDataSource = function ( popData ) {
155
158
156
159
if ( this . _dataSourcesStack . length < 2 ) return ;
157
160
158
161
this . DRILL_LEVEL -- ;
159
162
this . _dataSourcesStack . pop ( ) ;
160
- this . dataController . popData ( ) ;
163
+ if ( ! popData ) this . dataController . popData ( ) ;
161
164
162
165
this . dataSource = this . _dataSourcesStack [ this . _dataSourcesStack . length - 1 ] ;
163
166
@@ -222,7 +225,7 @@ LightPivotTable.prototype.tryDrillDown = function (filter) {
222
225
} ) ;
223
226
}
224
227
} else {
225
- _ . popDataSource ( ) ;
228
+ _ . popDataSource ( true ) ;
226
229
}
227
230
} ) ;
228
231
@@ -263,7 +266,7 @@ LightPivotTable.prototype.tryDrillThrough = function (filters) {
263
266
} ) ;
264
267
}
265
268
} else {
266
- _ . popDataSource ( ) ;
269
+ _ . popDataSource ( true ) ;
267
270
}
268
271
} ) ;
269
272
You can’t perform that action at this time.
0 commit comments