lazy-pagination-compose

An intuitive and customizable Compose Multiplatform pagination composables that are built on top of lazy scrollables. Available on Android, iOS, MacOS, Linux, and Web.

MIT License

Stars
90

Bot releases are hidden (Show)

lazy-pagination-compose - v1.3.5 Latest Release

Published by Ahmad-Hamwi 2 months ago

v1.3.5: Added support for Grids

  • You can now use the original grids but paginated! Composables: PaginatedLazyVerticalGrid or PaginatedLazyHorizontalGrid
[versions]
lazy-pagination-compose = "1.3.5"

[libraries]
lazyPaginationCompose = { module = "io.github.ahmad-hamwi:lazy-pagination-compose", version.ref = "lazy-pagination-compose" }
PaginatedLazyVerticalGrid(
    paginationState = paginationState,
    firstPageProgressIndicator = { ... },
    newPageProgressIndicator = { ... },
    firstPageErrorIndicator = { e -> // from setError
        ... e.message ...
        ... onRetry = { paginationState.retryLastFailedRequest() } ...
    },
    newPageErrorIndicator = { e -> ... },
    ... // The rest of LazyVerticalGrid params
) {
    itemsIndexed(
        paginationState.allItems,
    ) { _, item ->
        Item(value = item)
    }
}
PaginatedLazyHorizontalGrid(
    paginationState = paginationState,
    firstPageProgressIndicator = { ... },
    newPageProgressIndicator = { ... },
    firstPageErrorIndicator = { e -> // from setError
        ... e.message ...
        ... onRetry = { paginationState.retryLastFailedRequest() } ...
    },
    newPageErrorIndicator = { e -> ... },
    ... // The rest of LazyHorizontalGrid params
) {
    itemsIndexed(
        paginationState.allItems,
    ) { _, item ->
        Item(value = item)
    }
}
lazy-pagination-compose - v1.2.5

Published by Ahmad-Hamwi 2 months ago

v1.2.5: Added support for JS and wasm JS targets

  • You can now use the paginated composables on the web!
[versions]
lazy-pagination-compose = "1.2.5"

[libraries]
lazyPaginationCompose = { module = "io.github.ahmad-hamwi:lazy-pagination-compose", version.ref = "lazy-pagination-compose" }