From 9131065f12e961f83de19f64c81d0c03edc9bc1c Mon Sep 17 00:00:00 2001 From: Enrico Cimitan Date: Thu, 12 Dec 2024 13:56:41 +0100 Subject: [PATCH] React on render instead load --- .../Resources/PowerBIManagement/js/PowerBIManagement.js | 5 +++-- .../App/Resources/PowerBIManagement/js/PowerBIManagement.js | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/System Application/App/ControlAddIns/Resources/PowerBIManagement/js/PowerBIManagement.js b/src/System Application/App/ControlAddIns/Resources/PowerBIManagement/js/PowerBIManagement.js index 2617c632f0..e6ed209928 100644 --- a/src/System Application/App/ControlAddIns/Resources/PowerBIManagement/js/PowerBIManagement.js +++ b/src/System Application/App/ControlAddIns/Resources/PowerBIManagement/js/PowerBIManagement.js @@ -175,8 +175,8 @@ function EmbedPowerBIReport(reportLink, reportId, pageName) { RegisterCommonEmbedEvents(); - embed.off("loaded"); - embed.on('loaded', function (event) { + embed.off("rendered"); + embed.on('rendered', function (event) { var reportPages = null; var reportFilters = null; var pageFilters = null; @@ -207,6 +207,7 @@ function EmbedPowerBIReport(reportLink, reportId, pageName) { Promise.all(promises).then( function (values) { + embed.off("rendered"); RaiseReportLoaded(reportFilters, reportPages, pageFilters, embedCorrelationId); }, function (error) { diff --git a/src/System Application/App/Resources/PowerBIManagement/js/PowerBIManagement.js b/src/System Application/App/Resources/PowerBIManagement/js/PowerBIManagement.js index 2617c632f0..e6ed209928 100644 --- a/src/System Application/App/Resources/PowerBIManagement/js/PowerBIManagement.js +++ b/src/System Application/App/Resources/PowerBIManagement/js/PowerBIManagement.js @@ -175,8 +175,8 @@ function EmbedPowerBIReport(reportLink, reportId, pageName) { RegisterCommonEmbedEvents(); - embed.off("loaded"); - embed.on('loaded', function (event) { + embed.off("rendered"); + embed.on('rendered', function (event) { var reportPages = null; var reportFilters = null; var pageFilters = null; @@ -207,6 +207,7 @@ function EmbedPowerBIReport(reportLink, reportId, pageName) { Promise.all(promises).then( function (values) { + embed.off("rendered"); RaiseReportLoaded(reportFilters, reportPages, pageFilters, embedCorrelationId); }, function (error) {