I guess you mean by height: 'flex' , it makes the grid height equal to its content ( subject to maxHeight property ) and has nothing to do with web page scroll.
In your screenshots, both the grids have vertical scroll bars.
Please let me know if I've missed something.