Skip to content

Commit c87e8a1

Browse files
committed
Merged PR 20854: Merge omarmstr/iframe_size_and_save_bugs to master
bug fix for enterEdit mode, tile click event and dashboard embed not always loading
1 parent 0392a12 commit c87e8a1

4 files changed

Lines changed: 16 additions & 5 deletions

File tree

demo/v2-demo/scripts/codesamples.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -884,6 +884,6 @@ function _DashboardEvents_TileClicked() {
884884

885885
// dashboard.on will add an event listener.
886886
dashboard.on("tileClicked", function(event) {
887-
Log.log(event);
887+
Log.log(event.detail);
888888
});
889889
}

demo/v2-demo/scripts/function_mapping.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,14 @@ function IsNotSupported(funcName) {
4747
return false
4848
}
4949

50-
// Get a reference to the embedded element
5150
const dashboardRegEx = /Dashboard/
5251
const dashboardMatch = funcName.match(dashboardRegEx)
53-
var container = dashboardMatch ? '#dashboardContainer' : '#embedContainer';
52+
if (dashboardMatch) {
53+
return false;
54+
}
55+
56+
// Get a reference to the embedded element
57+
var container = '#embedContainer';
5458
var embed = powerbi.get($(container)[0]);
5559
if (embed.config.type !== 'create') {
5660
return false;

demo/v2-demo/scripts/report.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,13 @@ function OpenEmbedMode(mode, entityType)
156156
{
157157
LoadSampleDatasetIntoSession().then(function (response) {
158158
SetTextBoxesFromSessionOrUrlParam("#txtCreateAccessToken", "#txtCreateReportEmbed", "#txtEmbedDatasetId");
159+
setCodeAndShowEmbedSettings(mode, entityType);
159160
});
160161
}
161162
else
162163
{
163164
SetTextBoxesFromSessionOrUrlParam("#txtCreateAccessToken", "#txtCreateReportEmbed", "#txtEmbedDatasetId");
165+
setCodeAndShowEmbedSettings(mode, entityType);
164166
}
165167
}
166168
else
@@ -169,11 +171,13 @@ function OpenEmbedMode(mode, entityType)
169171
{
170172
LoadSampleReportIntoSession().then(function (response) {
171173
SetTextBoxesFromSessionOrUrlParam("#txtAccessToken", "#txtReportEmbed", "#txtEmbedReportId");
174+
setCodeAndShowEmbedSettings(mode, entityType);
172175
});
173176
}
174177
else
175178
{
176179
SetTextBoxesFromSessionOrUrlParam("#txtAccessToken", "#txtReportEmbed", "#txtEmbedReportId");
180+
setCodeAndShowEmbedSettings(mode, entityType);
177181
}
178182
}
179183
}
@@ -183,15 +187,18 @@ function OpenEmbedMode(mode, entityType)
183187
{
184188
LoadSampleDashboardIntoSession().then(function (response) {
185189
SetTextBoxesFromSessionOrUrlParam("#txtAccessToken", "#txtDashboardEmbed", "#txtEmbedDashboardId");
190+
setCodeAndShowEmbedSettings(mode, entityType);
186191
});
187192
}
188193
else
189194
{
190195
SetTextBoxesFromSessionOrUrlParam("#txtAccessToken", "#txtDashboardEmbed", "#txtEmbedDashboardId");
196+
setCodeAndShowEmbedSettings(mode, entityType);
191197
}
192198
}
193-
199+
}
194200

201+
function setCodeAndShowEmbedSettings(mode, entityType) {
195202
setCodeArea(mode, entityType);
196203
showEmbedSettings(mode, entityType);
197204
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
},
7676
"dependencies": {
7777
"http-post-message": "^0.2",
78-
"powerbi-models": "^0.11",
78+
"powerbi-models": "^0.11.2",
7979
"powerbi-router": "^0.1",
8080
"window-post-message-proxy": "^0.2"
8181
},

0 commit comments

Comments
 (0)