Skip to content

Commit

Permalink
Delay creating property grid survey
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtelnov committed Feb 18, 2025
1 parent a9fd137 commit 27b796b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/survey-creator-core/src/property-grid/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1134,6 +1134,7 @@ export class PropertyGridModel {
});
}
public expandCategoryIfNeeded(): void {
if(!this.surveyValue) return;
const expandedTabName = creatorSettings.propertyGrid.defaultExpandedTabName;
if (!!expandedTabName && !this.getPropertyGridExpandedCategory()) {
const panel = <PanelModel>this.survey.getPanelByName(expandedTabName);
Expand Down
1 change: 1 addition & 0 deletions packages/survey-creator-core/tests/creator-base-1.tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4088,6 +4088,7 @@ test("Initial Property Grid category expanded state", (): any => {
const defaultJSON = settings.defaultNewSurveyJSON;
settings.defaultNewSurveyJSON = {};
creator.JSON = {};
expect(creator.propertyGrid).toBeTruthy();
expect(getCategoryName()).toBeFalsy();
creator.survey.addNewPage("page1");
creator.selectElement(creator.survey.getPageByName("page1"));
Expand Down

0 comments on commit 27b796b

Please sign in to comment.