responsive-layout icon indicating copy to clipboard operation
responsive-layout copied to clipboard

Making columns in one row have the same height

Open F43nd1r opened this issue 6 years ago • 2 comments

I have the following setup: I have two panels, which are displayed like this:

    ResponsiveLayout responsiveLayout = new ResponsiveLayout().withScrollable(true);
    ResponsiveRow row = responsiveLayout.addRow().withSpacing(ResponsiveRow.SpacingSize.SMALL, true).withMargin(ResponsiveRow.MarginSize.SMALL);
    row.addColumn().withComponent(panel1).withDisplayRules(12, 12, 6, 6);
    row.addColumn().withComponent(panel2).withDisplayRules(12, 12, 6, 6);

How can I make both panels have the same height (without knowing which one is bigger) if they are side by side, but not if they aren't?

F43nd1r avatar May 24 '18 00:05 F43nd1r

I am facing the same issue. Looks like a bug. Currently only this workaround came to my mind:

  • let the view to render as it is
  • use the SizeReporter addon to get real height of the bigger panel (https://vaadin.com/directory/component/sizereporter)
  • and set the same height on the smaller panel

ghost avatar Feb 05 '19 12:02 ghost

I've moved on from this to Vaadin flow, where responsive layouts are no problem anymore.

F43nd1r avatar Feb 05 '19 18:02 F43nd1r