Skip to main content

virtual_list

Function virtual_list 

Source
pub fn virtual_list<V: Render, R: IntoElement>(
    view: Entity<V>,
    id: impl Into<ElementId>,
    sizes: Rc<Vec<Size<Pixels>>>,
    render: impl Fn(&mut V, Range<usize>, &mut Window, &mut Context<'_, V>) -> Vec<R> + 'static,
    cx: &App,
) -> VirtualList
Expand description

Each supplied size must match the corresponding row’s rendered height. Only the visible range is built. Attach a base VirtualListScrollHandle to preserve scroll position and support navigation to a specific item.