1
- import { Base , ComputedUpdater , IAction , ISurveyData , ItemValue , JsonMetadata , JsonMetadataClass , JsonObjectProperty , MatrixDropdownColumn , MatrixDropdownRowModelBase , MatrixDynamicRowModel , PanelModel , Question , QuestionHtmlModel , QuestionMatrixDropdownModelBase , QuestionMatrixDropdownRenderedRow , QuestionMatrixDynamicModel , QuestionRatingModel , renamedIcons , Serializer , SurveyElement } from "survey-core" ;
1
+ import { Base , ComputedUpdater , IAction , ISurveyData , ItemValue , JsonMetadata , JsonMetadataClass , JsonObjectProperty , MatrixDropdownColumn , MatrixDropdownRowModelBase , MatrixDynamicRowModel , PanelModel , Question , QuestionHtmlModel , QuestionMatrixDropdownModelBase , QuestionMatrixDropdownRenderedRow , QuestionMatrixDynamicModel , QuestionRatingModel , renamedIcons , Serializer , SurveyElement , SurveyModel } from "survey-core" ;
2
2
import { editorLocalization } from "../editorLocalization" ;
3
3
import { SurveyQuestionProperties } from "../question-editor/properties" ;
4
4
import { ISurveyCreatorOptions , settings } from "../creator-settings" ;
@@ -12,7 +12,6 @@ import {
12
12
} from "./index" ;
13
13
import { updateMatixActionsClasses , updateMatrixRemoveAction } from "../utils/actions" ;
14
14
import { QuestionRatingAdornerViewModel } from "../components/question-rating" ;
15
- import { CreatorBase } from "../creator-base" ;
16
15
import { ISurveyPropertyGridDefinition } from "../question-editor/definition" ;
17
16
18
17
Serializer . addProperty ( "itemvalue" ,
@@ -669,7 +668,9 @@ export class PropertyGridEditorMatrixPages extends PropertyGridEditorMatrix {
669
668
return prop . type == "surveypages" ;
670
669
}
671
670
protected addItem ( creator : ISurveyCreatorOptions , obj : Base , question : QuestionMatrixDynamicModel ) {
672
- ( creator as CreatorBase ) . addPage ( undefined , false ) ;
671
+ if ( creator . canAddPage ( ) ) {
672
+ super . addItem ( creator , obj , question ) ;
673
+ }
673
674
}
674
675
protected getColumnClassName ( obj : Base , prop : JsonObjectProperty ) : string {
675
676
return "page@" + obj . getType ( ) ;
0 commit comments