Closed keaj-albert closed 5 years ago
@dmitrykurmanov Could you take a look?
@tsv2013 I think we have some problem with the knockout templates reusing.
@keaj-albert I've prepared a workaround for you, please check this code:
...
console.log("init survey");
function surveyFix() {
var surveyContentParentNode = null;
var surveyContentNode = document.getElementById("survey-content");
var isRenderedBefore = !!surveyContentNode;
if (isRenderedBefore) {
surveyContentParentNode = surveyContentNode.parentNode;
surveyContentParentNode.parentNode.removeChild(surveyContentParentNode);
}
}
surveyFix();
surveyModel.render("surveyElement");
and I created a PR https://github.com/albertjke/surveyjs-poc/pull/1
@dmitrykurmanov Thanks for taking a look! Workaround is working.
the problem appears in ko 3.5.0 (3.4.0 works fine)
@dmitrykurmanov Using ko 3.4.0 now and it works as expected. Thanks!
We've fixed the issue. Fix will be available in the nearest update, most likely next tuesday.
We've fixed the issue. Fix will be available in the nearest update, most likely next tuesday.
I have a parent component that has two child components. A survey component and a survey-creator component. The parent component has a button to toggle whether the survey component is visible or the survey-creator component is visible (via ngIf).
The problem is that after viewing the survey-creator component and toggling back to the survey component, the survey component doesn't render.
Steps to reproduce with this simple project:
ng serve
to open application at localhost:4200. Survey component should be visible.