Vaadin grid dynamic height

Hi, I am using Vaadin-grid and I need my grid to be dynamic, in that it grows in accordance to the number of its rows. I’ve searched questions in the forum and found this codepen from another question but setting height to 100% makes the grid disappear.

https://codepen.io/anon/pen/QNEaWR

I’ve also tried the property heightByRows but it’s having no effect as the image shows. And setting a height makes it fixed and I get a scroll when the rows are larger than the table. I’ve also tried a min and max height.
Basically the grid needs to have one row and grow as more rows are added.
I am using polymer 3.

17798033.png

height-by-rows did the trick

@Nkosiphillip i am having the same issue. trying to set the grid to display containing content. I tried what you suggested with heightByRows(true) method. how did you get it to work?