I noticed after the release v1.9.128
, that interface changes happened. I wanted to draw your attention that PropertyEditorCreatedEvent
is missing obj
while it is received in the actual js object.
Property `obj` is not existing in the interface PropertyEditorCreatedEvent but is still sent in the actual javascript object
Answers approved by surveyjs Support
Hello,
I have updated our event by adding "obj" property into it. It will be available in the version we will release next week.
Meanwhile, please case to any (<any>options).obj.isQuestion
,
Thank you,
Andrew
SurveyJS Team
Hello,
editor.obj
is for internal use. There is a possibility that we change it in the future. It is better to use options.obj
.
Thank you,
Andrew
SurveyJS Team
Hi Andrew,
i checked the last update, and the issue with options.obj
is fixed. However, now the property obj
of type Base
, does not include the property isQuestion
.
Hello,
Thank you for the update. You can cast options.obj
to a base SurveyElement
class as follows to access the isQuestion
property:
JavaScriptimport { SurveyElement } from "survey-core";
creator.onPropertyEditorCreated.add((sender, options) => {
if ((options.obj as SurveyElement).isQuestion) {
//...
}
});
Please let me know if you have any further questions.
Other Answers
I see for example that this obj
property is accessible through
Codelet event: PropertyEditorCreatedEvent;
event.editor.obj;