Question T18577
Visible to All Users

[Angular] survey creator - how to fit parent container

created a year ago

Hi all,
i'm trying to fit survey-creator to parent container without success.
i found another ticket, when there was reference to designerHeight, like this Question T2767
but without success.
can you help me with an example in angular?

this is my survey version:

Code
"survey-analytics": "^1.11.2", "survey-angular-ui": "^1.11.2", "survey-creator-angular": "^1.11.2", "survey-creator-core": "^1.11.2",

thanks in advance

Answers approved by surveyjs Support

created a year ago (modified a year ago)

Hello Raffaele,
If you use the modern SurveyJS Creator (so called Survey Creator V2), you don't need to explicitly specify any designerHeight attribute. To fit a creator within a parent container, specify dimensions of a creator's div container element. Consider the following demo:

HTML
<div class="fixed-container"> <survey-creator [model]="model"></survey-creator> </div>
CSS
.fixed-container { width: 500px; height: 400px; display: flex; justify-content: center; align-items: center; }

View Demo
Please let me know if you require further assistance.

    Show previous comments (1)

      Hello,
      Yes, it is possible. I updated the demo to apply your custom CSS styles to a parent creator's container: View Demo.

      Let me know if you have further questions.

        Hello, I have the same problem with my vue application:
        All my parents have the height set to 100% but the survey creator does not take the 100% height when init.

        Here the code

        Click on the "Manage" link and the survey Creator will appear not full height.

        Thanks in advance ! :)

          Hello,

          I created a separate ticket on your behalf: T19137: SurveyJS Creator for Vue3 doesn't fit the parent container. We placed it in our processing queue and will process it shortly.