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" ,
@@ -671,7 +670,9 @@ export class PropertyGridEditorMatrixPages extends PropertyGridEditorMatrix {
671
670
return prop . type == "surveypages" ;
672
671
}
673
672
protected addItem ( creator : ISurveyCreatorOptions , obj : Base , question : QuestionMatrixDynamicModel ) {
674
- ( creator as CreatorBase ) . addPage ( undefined , false ) ;
673
+ if ( creator . canAddPage ( ) ) {
674
+ super . addItem ( creator , obj , question ) ;
675
+ }
675
676
}
676
677
protected getColumnClassName ( obj : Base , prop : JsonObjectProperty ) : string {
677
678
return "page@" + obj . getType ( ) ;
0 commit comments