Skip to main content

LazyGrid

Function LazyGrid 

Source
pub fn LazyGrid(_: LazyGridProps) -> Element
Expand description

A grid that only builds the rows it can show.

The windowing protocol is LazyColumn’s, unchanged: the Renderer asks for a range of items and this materialises exactly that range. What a grid adds is that the range arrives rounded to whole rows, because a row is what the Renderer lays out.

How wide a column is can be said two ways, and they are different questions. columns is a count the screen insists on. min_column_width is a width below which a column may not fall, and the Renderer divides its own width by it: that is the same judgement as a size class, made where the width is known, so the Host does not make it.

Saying both is saying the count, because a count leaves nothing for the width to decide.

§Props

For details, see the props struct definition.