referencing #1043,
I've upgraded survey-react, and now my special panels are not working.
Surely i can overwrite row createElement, but IMHO permit to override the default panel renderer by exposing ReactElementFactory as https://github.com/surveyjs/surveyjs/issues/1274#issuecomment-412545414 suggest will be a better long term solution.
Am I Right?
Thanks in advance
Marco
@marc0n3 Could you share your code? We have added a flow panel several weeks ago (it is still not finish completely, but you may make it visible on Editor Toolbar). Probably this is the reason.
Thank you,
Andrew
It was like this, for the old version:
SurveyRow.prototype.createQuestion =function(question){
if (question.isPanel) {
return (
<SurveyPanelExtension
key={question.name}
panel={question}
creator={this.creator}
survey={this.survey}
css={this.css}
/>
);
} else {
return (
<SurveyQuestion
key={question.name}
question={question}
creator={this.creator}
css={this.css}
/>
);
}
}
see bug #1043, for our previous talk
@marc0n3 Please use the following code:
ReactElementFactory.Instance.registerElement("panel", props => {
return React.createElement(SurveyPanelExtension, props);
});
Thank you,
Andrew
I've exported the ReactElementFactory
@marc0n3 You should to wait till the next build. ReactElementFactory was an internal class. @tsv2013 just added it into export classes file. We will release a new version in couple days.
Thank you,
Andrew
Thank you @andrewtelnov and @tsv2013