From 74fe97c70c4fd69b7fe8ec81c63484a115045b63 Mon Sep 17 00:00:00 2001 From: tsv2013 Date: Mon, 15 Jul 2024 17:56:44 +0300 Subject: [PATCH] Patch render func in jquery-ui --- src/entries/jquery-ui.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/entries/jquery-ui.ts b/src/entries/jquery-ui.ts index 78c5542138..724cfa06bf 100644 --- a/src/entries/jquery-ui.ts +++ b/src/entries/jquery-ui.ts @@ -26,6 +26,14 @@ function doPopupSurvey(props: any): void { } SurveyModel.platform = "jquery"; +SurveyModel.prototype["render"] = function (element: any = null) { + if (this.renderCallback) { + this.renderCallback(); + } else { + const survey = React.createElement(Survey, { model: this }); + ReactDOM.render(survey, element); + } +}; export const preact: any = React;