Skip to content

Commit

Permalink
Fixed surveyjs/survey-creator#6029 - Performance: On switching from P…
Browse files Browse the repository at this point in the history
…review to Designer adorners are created for all questions
  • Loading branch information
tsv2013 committed Nov 5, 2024
1 parent 5e83011 commit dc185fd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/survey-react-ui/src/element.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,16 @@ export class SurveyRowElement extends SurveyElementBase<any, any> {
onFocus={focusIn}
ref={this.rootRef}
>
{this.row.isNeedRender ? innerElement : ReactElementFactory.Instance.createElement(element.skeletonComponentName, { element: element, css: this.css, })}
{innerElement}
</div>
);
}

protected createElement(element: IElement, elementIndex?: number): JSX.Element {
const index = elementIndex ? "-" + elementIndex : 0;
if(!this.row.isNeedRender) {
return ReactElementFactory.Instance.createElement(element.skeletonComponentName, { key: element.name + index, element: element, css: this.css, })
}
var elementType = element.getType();
if (!ReactElementFactory.Instance.isElementRegistered(elementType)) {
elementType = "question";
Expand Down

0 comments on commit dc185fd

Please sign in to comment.