Function gpui2::uniform_list

source ·
pub fn uniform_list<I, R, V>(
    view: View<V>,
    id: I,
    item_count: usize,
    f: impl 'static + Fn(&mut V, Range<usize>, &mut ViewContext<'_, V>) -> Vec<R>
) -> UniformListwhere
    I: Into<ElementId>,
    R: RenderOnce,
    V: Render,
Expand description

uniform_list provides lazy rendering for a set of items that are of uniform height. When rendered into a container with overflow-y: hidden and a fixed (or max) height, uniform_list will only render the visibile subset of items.