From b7c81faf19d14f1628796e07b4dce2cd9cf2d5f2 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 06a3e840aa..4ea78f26f3 100644 --- a/src/System Application/App/ControlAddIns/Resources/PowerBIManagement/js/PowerBIManagement.js +++ b/src/System Application/App/ControlAddIns/Resources/PowerBIManagement/js/PowerBIManagement.js @@ -164,8 +164,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; @@ -196,6 +196,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 06a3e840aa..4ea78f26f3 100644 --- a/src/System Application/App/Resources/PowerBIManagement/js/PowerBIManagement.js +++ b/src/System Application/App/Resources/PowerBIManagement/js/PowerBIManagement.js @@ -164,8 +164,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; @@ -196,6 +196,7 @@ function EmbedPowerBIReport(reportLink, reportId, pageName) { Promise.all(promises).then( function (values) { + embed.off("rendered"); RaiseReportLoaded(reportFilters, reportPages, pageFilters, embedCorrelationId); }, function (error) {