From 4ac0eaaa88b0b61860795f23657cc206d94ffa13 Mon Sep 17 00:00:00 2001 From: RomanTsukanov Date: Fri, 15 Mar 2024 16:24:39 +0400 Subject: [PATCH] Describe the `onMatrixDetailPanelVisibleChanged` event --- src/survey-events-api.ts | 10 ++++++++-- src/survey.ts | 3 +++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/survey-events-api.ts b/src/survey-events-api.ts index 3518bccd9b..ec3a19d858 100644 --- a/src/survey-events-api.ts +++ b/src/survey-events-api.ts @@ -711,15 +711,21 @@ export interface MatrixAllowRemoveRowEvent extends MatrixDynamicQuestionEventMix } export interface MatrixDetailPanelVisibleChangedEvent extends MatrixDropdownQuestionEventMixin { /** - * A matrix row for which the event is raised. + * A matrix row to which the detail section belongs. */ row: MatrixDropdownRowModelBase; /** * A zero-based row index. */ rowIndex: number; - isShowing: boolean; + /** + * A [PanelModel](https://surveyjs.io/form-library/documentation/panelmodel) that represents the detail section. + */ detailPanel: PanelModel; + /** + * Indicates whether the detail section is visible now. + */ + isShowing: boolean; } export interface MatrixCellCreatingBaseEvent extends MatrixDropdownQuestionEventMixin { diff --git a/src/survey.ts b/src/survey.ts index 68161c88bc..57eb61aa68 100644 --- a/src/survey.ts +++ b/src/survey.ts @@ -673,6 +673,9 @@ export class SurveyModel extends SurveyElementCore * This event is obsolete. Use the [`onMatrixRenderRemoveButton`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onMatrixRenderRemoveButton) event instead. */ public onMatrixAllowRemoveRow: EventBase = this.onMatrixRenderRemoveButton; + /** + * An event that is raised after the visibility of an [expandable detail section](https://surveyjs.io/form-library/examples/add-expandable-details-section-under-matrix-rows/) is changed. This event can be raised for [Multi-Select](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-with-dropdown-list) and [Dynamic Matrix](https://surveyjs.io/form-library/documentation/api-reference/dynamic-matrix-table-question-model) questions. + */ public onMatrixDetailPanelVisibleChanged: EventBase = this.addEvent(); /** * An event that is raised before a cell in a [Multi-Select Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdropdown/) or [Dynamic Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdynamic/) is created. Use this event to change the type of individual matrix cells.