diff --git a/src/propertyEditors/propertyItemValuesEditor.ts b/src/propertyEditors/propertyItemValuesEditor.ts index 3cd1389e5c..d7e0b1c43e 100644 --- a/src/propertyEditors/propertyItemValuesEditor.ts +++ b/src/propertyEditors/propertyItemValuesEditor.ts @@ -72,18 +72,24 @@ export class SurveyPropertyItemValuesEditor extends SurveyNestedPropertyEditor { } protected createColumns(): Array { var result = []; - var properties = this.getProperties(); + var properties = this.getProperties(true); for (var i = 0; i < properties.length; i++) { - if (!properties[i].visible) continue; result.push(new SurveyPropertyItemValuesEditorColumn(properties[i])); } return result; } - protected getProperties(): Array { + protected getProperties( + visibleOnly: boolean = false + ): Array { var className = this.property ? this.property.type : "itemvalue"; if (className == this.editorType) className = "itemvalue"; var properties = Survey.JsonObject.metaData.getProperties(className); - return properties; + var res = []; + for (var i = 0; i < properties.length; i++) { + if (visibleOnly && !properties[i].visible) continue; + res.push(properties[i]); + } + return res; } protected createEditorOptions(): any { var options = super.createEditorOptions(); @@ -170,7 +176,7 @@ export class SurveyPropertyItemValuesEditor extends SurveyNestedPropertyEditor { protected updateItems(text: string) { var items = []; if (text) { - var properties = this.getProperties(); + var properties = this.getProperties(true); var texts = text.split("\n"); for (var i = 0; i < texts.length; i++) { if (!texts[i]) continue; diff --git a/src/propertyEditors/propertyRestfullEditor.ts b/src/propertyEditors/propertyRestfullEditor.ts index cd1ddf33af..2a12ba46dd 100644 --- a/src/propertyEditors/propertyRestfullEditor.ts +++ b/src/propertyEditors/propertyRestfullEditor.ts @@ -59,6 +59,7 @@ export class SurveyPropertyResultfullEditor extends SurveyPropertyModalEditor { var customProperties = val["getCustomPropertiesNames"](); for (var i = 0; i < customProperties.length; i++) { var propName = customProperties[i]; + if (propName === "visibleIfName") continue; //TODO remove later this.addItem(propName, val); } } diff --git a/tests/SurveyEditorTests.ts b/tests/SurveyEditorTests.ts index 0833159a6a..3ffa98a04c 100644 --- a/tests/SurveyEditorTests.ts +++ b/tests/SurveyEditorTests.ts @@ -301,7 +301,6 @@ QUnit.test("Copy a page", function(assert) { }); QUnit.test("fast copy tests, set the correct parent", function(assert) { - debugger; var editor = new SurveyEditor(); var survey = editor.survey; var p1 = editor["pages"]()[0].addNewPanel("panel1");