Question T11485
Visible to All Users

The PROPERTY_CHANGED action is always inferred in the onModified event

created 2 years ago (modified 2 years ago)

[Ticket cloned from T11482: Get Question Object from MatrixDropdownColumn in onModified Callback]

Hi Jane, apologies but I do have another question related to this.
Is there a reason that PROPERTY_CHANGED is always inferred in the onModified callback method along with any other action type?
For example, if I add a new question, I can see that the action ADDED_FROM_TOOLBOX is correctly inferred, but I can also see that PROPERTY_CHANGED is as well. The same behavior applies if I change a question's type: I can see that QUESTION_CONVERTED is inferred, but once again, PROPERTY_CHANGED is inferred as well. Both options objects in both cases have different definitions and properties and therefore this causes unexpected behavior.

I would only expect the PROPERTY_CHANGED action to be inferred when a property within a question is changed (like the title, description, column/row etc), rather than alongside any other action (such as duplicating a question, adding a new question etc) like in the example I mentioned above.

Answers approved by surveyjs Support

created 2 years ago

Hello Mo,
When you add a question, the onModified event is raised. It receives the PROPERTY_CHANGED type because a new question is added and hence, the elements property of a page element has been modified.
This being said, the onModified event allows you to track a change within a survey being edited.

If you wish to handle a property change event, consider the following events:

Please let me know if you have any questions or require further assistance.

    Comments (2)

      Hi Jane, thank you. This makes sense.

        No problem. Please feel free to contact us if you have any questions.