Unable to display grids inside a responsive dialog using vaadin 14

Viewed 147

I am trying to display grids that are in dialog but they only appear if we define a height like grid.setHeight(200px). this is my code : https://gist.github.com/ust3000/b41c1c829e2e6d9a64b9e082bc150f5f What is the right way to display grid inside Dialog and make the dialog responsive ?

public class TestPage extends HorizontalLayout {
public TestPage() {
    setJustifyContentMode(JustifyContentMode.CENTER);
    Grid<Row> grid1 = new Grid<>();
    Grid<Row> grid2 = new Grid<>();
    SplitLayout sp = new SplitLayout(grid1, grid2);
    sp.setOrientation(SplitLayout.Orientation.HORIZONTAL);
    // add column and populate grid1 and grid2
    Dialog dialog = new Dialog();
    dialog.add(sp);
    this.add(dialog);
    this.expand(dialog);
    dialog.open();
    this.setSizeFull();
  }
}
1 Answers

What is the exact version you are using?

I am running the 14.1.19 with your example and it works as expected : enter image description here

But to your second question, the responsive API for the dialog comes with 14.2 version, but you can try it already now with the latest aplha : 14.2.0.apha9:)

Related