File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -80,6 +80,8 @@ DataController.prototype.getData = function () {
8080
8181DataController . 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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 ,
You can’t perform that action at this time.
0 commit comments