File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -151,13 +151,16 @@ LightPivotTable.prototype.pushDataSource = function (config) {
151151
152152} ;
153153
154- LightPivotTable . prototype . popDataSource = function ( ) {
154+ /**
155+ * @param {boolean } [popData = true] - Also pop data in dataSource.
156+ */
157+ LightPivotTable . prototype . popDataSource = function ( popData ) {
155158
156159 if ( this . _dataSourcesStack . length < 2 ) return ;
157160
158161 this . DRILL_LEVEL -- ;
159162 this . _dataSourcesStack . pop ( ) ;
160- this . dataController . popData ( ) ;
163+ if ( ! popData ) this . dataController . popData ( ) ;
161164
162165 this . dataSource = this . _dataSourcesStack [ this . _dataSourcesStack . length - 1 ] ;
163166
@@ -222,7 +225,7 @@ LightPivotTable.prototype.tryDrillDown = function (filter) {
222225 } ) ;
223226 }
224227 } else {
225- _ . popDataSource ( ) ;
228+ _ . popDataSource ( true ) ;
226229 }
227230 } ) ;
228231
@@ -263,7 +266,7 @@ LightPivotTable.prototype.tryDrillThrough = function (filters) {
263266 } ) ;
264267 }
265268 } else {
266- _ . popDataSource ( ) ;
269+ _ . popDataSource ( true ) ;
267270 }
268271 } ) ;
269272
You can’t perform that action at this time.
0 commit comments