admin管理员组文章数量:1435859
I use primeNG (Angular2) to show the modal:
<p-dialog appendTo="body" [(visible)]="displayCreateGateway" modal]="true" [width]="700">
When I am on mobile view (less than declared 700px) modal does not display correctly. For example: I have window width 500 px, but modal generates in 700 px (properly will be width:100%). I think this is not fault of my code, because in official website primeNG situation is the same.
Do you know how to solve this problem? The easiest way is probably add media queries in css, but override ponent from primeNG isn't easy. Maybe helpful will be JS?
I use primeNG (Angular2) to show the modal:
<p-dialog appendTo="body" [(visible)]="displayCreateGateway" modal]="true" [width]="700">
When I am on mobile view (less than declared 700px) modal does not display correctly. For example: I have window width 500 px, but modal generates in 700 px (properly will be width:100%). I think this is not fault of my code, because in official website primeNG situation is the same.
Do you know how to solve this problem? The easiest way is probably add media queries in css, but override ponent from primeNG isn't easy. Maybe helpful will be JS?
Share Improve this question asked Jun 30, 2017 at 8:45 ItalikItalik 6963 gold badges20 silver badges37 bronze badges 1- Please correct your tagging (read the content of all tags and remove those the one you are not using) – Kukeltje Commented Jun 30, 2017 at 9:48
1 Answer
Reset to default 4If you look at the documentation of the ponent, you will see a styleClass
attribute, used like this :
<p-dialog styleClass="myStyle">
When you do that, it adds a new class to the ponent, allowing you to style it as you want.
本文标签: javascriptDialog component in primeNG no responsive on mobile viewStack Overflow
版权声明:本文标题:javascript - Dialog component in primeNG no responsive on mobile view - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745666660a2669327.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论