surveyjs / survey-creator

Scalable open-source survey software to generate dynamic JSON-driven forms within your JavaScript application. The form builder features a drag-and-drop UI, CSS Theme Editor, and GUI for conditional logic and form branching.
https://surveyjs.io/open-source
Other
898 stars 373 forks source link

The `onItemValueAdded` event is not raised when a new matrix row is added by pressing the Enter key on the design surface #5275

Closed JaneSjs closed 6 months ago

JaneSjs commented 7 months ago

T17025 - MatrixColumnAdded event not working if we try to create new column from survey design surface using enter key https://surveyjs.answerdesk.io/internal/ticket/details/T17025


View Demo

The creator.onItemValueAdded event is correctly raised if you add rows via a property grid's rows editor. However, this event is not invoked if you add rows by pressing Enter in a design surface.

image

JaneSjs commented 6 months ago

The issue: if you add rows via a property grid, the options.rows array contains a newly added row object. However, if you add a row via the design surface, the options.rows array doesn't contain a newly added row.

https://plnkr.co/edit/R5cMOt2bhpjwghMg

JaneSjs commented 6 months ago

Please update the documentation https://surveyjs.io/survey-creator/documentation/api-reference/survey-creator#onItemValueAdded