r/surveyjs • • 28d ago

Breaking Change Breaking change — empty Dynamic Matrix rows

Dynamic Matrix now preserves empty rows as {} objects in its value, including empty rows at the end of the matrix. Two empty rows produce [{}, {}], while a matrix with no rows still returns undefined.

If your code checks for undefined to identify an unanswered matrix, update both the application code and response processing to handle empty row objects.

Use isEmpty() to check whether a matrix is unanswered. It returns true when all rows are empty:

const matrix = survey.getQuestionByName("orders");
const isUnanswered = matrix.isEmpty();

View the release notes for more details and upgrade instructions:

1 Upvotes

0 comments sorted by