Fix applyExplorerBindings call in Portal (#408)

This commit is contained in:
Steve Faulkner
2021-01-27 20:37:14 -06:00
committed by GitHub
parent f1db1ed978
commit a14d20a88e
4 changed files with 58 additions and 2 deletions

View File

@@ -41,12 +41,13 @@ export function useKnockoutExplorer(config: ConfigContext, explorerParams: Explo
if (config) {
if (config.platform === Platform.Hosted) {
await configureHosted(config);
applyExplorerBindings(explorer);
} else if (config.platform === Platform.Emulator) {
configureEmulator();
applyExplorerBindings(explorer);
} else if (config.platform === Platform.Portal) {
configurePortal();
}
applyExplorerBindings(explorer);
}
};
effect();
@@ -237,13 +238,14 @@ function configurePortal() {
);
console.dir(message);
explorer.configure(message);
applyExplorerBindings(explorer);
}
}
// In the Portal, configuration of Explorer happens via iframe message
window.addEventListener(
"message",
(event) => {
console.dir(event);
if (isInvalidParentFrameOrigin(event)) {
return;
}
@@ -265,6 +267,7 @@ function configurePortal() {
}
explorer.configure(inputs);
applyExplorerBindings(explorer);
}
},
false