How to correctly specify dialog size in vaadin-flow

后端 未结 2 1664
孤街浪徒
孤街浪徒 2021-01-28 13:38

Trying to open a dialog from a grid renderer which contain a button. The problem is that the dialog isn\'t respecting the specified size.

I\'ve tried setting the width a

相关标签:
2条回答
  • 2021-01-28 13:48

    Fixed the problem by using Lumo theme instead of Material one.

    0 讨论(0)
  • 2021-01-28 13:52

    Faced same case recently. You can disable width limit by styling your dialog using @HtmlImport :

    @HtmlImport("styles/order-edit.html")
    class OrderEdit(val orderId: String, okHandler: (Order)->Unit): Dialog() {
    ...
    }
    

    with following content:

    <dom-module id="dialog-fix" theme-for="vaadin-dialog-overlay">
        <template>
            <style>
                [part~="overlay"]{
                    max-width: none !important;
                }
            </style>
        </template>
    </dom-module>
    
    0 讨论(0)
提交回复
热议问题