pub fn use_load_on_demand<T, L, Q, E, M>(
range_to_load: impl Into<Signal<Range<usize>>>,
range_to_display: impl Into<Signal<Range<usize>>>,
loader: L,
query: impl Into<Signal<Q>>,
) -> UseLoadOnDemandResult<T, E>Expand description
Load items on demand and cache them.
Underlying functionality of [use_pagination] and [use_virtualization].
You most probably don’t want to use this directly but either [use_pagination] or [use_virtualization].
§Params
load_range: A signal of the range of items to load. This has to include thedisplay_range. Control the range of items to load and cache.display_range: A signal of the range of items to display. This will be used for the returnedItemWindow.loader: The loader to use for loading items.query: A signal of the query to use for loading items.
§Returns
A tuple containing:
Signal<Result<Option<usize>, E>>: A signal of the total number of items. This will be either:Ok(Some(n)): The total number of items.Ok(None): The total number of items is unknown.Err(e): An error occurred while loading the total number of items.
ItemWindow<T>: A window of items that can be used to render a list/table of items.