LazyLoad
A composable function that enables infinite scrolling for a LazyVerticalGrid or LazyHorizontalGrid.
This function automatically triggers the loadMore callback when the user scrolls close to the end of the grid, based on the specified threshold.
NOTE: For each unique loadMoreParam value, the loadMore callback will be invoked at most once. When loadMoreParam changes, the load detection will start over with the new parameter.
Parameters
The type of parameter to pass to the loadMore callback
The LazyGridState of the lazy grid to monitor
Callback function that will be invoked to load additional data
Parameter to pass to the loadMore callback, if null no loading will occur
Configuration that determines when to trigger loading more items
Duration to debounce scroll events to prevent multiple rapid load requests
A composable function that enables infinite scrolling for a LazyColumn or LazyRow.
This function automatically triggers the loadMore callback when the user scrolls close to the end of the list, based on the specified threshold.
NOTE: For each unique loadMoreParam value, the loadMore callback will be invoked at most once. When loadMoreParam changes, the load detection will start over with the new parameter.
Parameters
The type of parameter to pass to the loadMore callback
The LazyListState of the lazy list to monitor
Callback function that will be invoked to load additional data
Parameter to pass to the loadMore callback, if null no loading will occur
Configuration that determines when to trigger loading more items
Duration to debounce scroll events to prevent multiple rapid load requests
Core composable that implements infinite scrolling logic for any scrollable state.
This function sets up a LaunchedEffect that monitors the scroll state and triggers the loadMore callback when the scrolling position meets the conditions defined by the strategy.
NOTE: For each unique loadMoreParam value, the loadMore callback will be invoked at most once. When loadMoreParam changes, the load detection will start over with the new parameter.
Parameters
The type of parameter to pass to the loadMore callback
The type of scrollable state being monitored
The scrollable state to monitor (e.g., LazyListState, LazyGridState)
Callback function that will be invoked to load additional data
Parameter to pass to the loadMore callback, if null no loading will occur
Strategy that determines when additional data should be loaded
Duration to debounce scroll events to prevent multiple rapid load requests