Quantcast
Channel: Developer topics
Viewing all articles
Browse latest Browse all 18102

page.isActive doesn't update after calling setPage

$
0
0

Hi all,

 

I'm embedding a Power BI report and have a button that will set the active page. Later I query the active page, but the original page is still set as active. Note that I do fetch the pages again using getPages(), so I'd expect to get the current values.

 

Code sample is below, it's very simple so I don't think I'm doing anything wrong (but I might well be!)

 

Any help apreciated.

 

Colin

 

var pageCodeName = "..." //name from somewhere, it is valid
var report = powerbi.embed(...);
//button calls this function setThePage(){ //this sets the active page, I can see it switch correctly report.setPage(pageCodeName); //some time later, ask which page is active window.setTimeout(function(){ report.getPages().then(function(pages){ for(var i=0; i<pages.length; i++){ if(pages[i].isActive){
//this alerts the original page name, not the currently active one alert(pages[i].displayName); } } }); }, 10000); }

Viewing all articles
Browse latest Browse all 18102

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>