Skip to content

senbax/reflex-pagination

Repository files navigation

reflex-pagination

Use the pagination like this

# Snippet from reflex_pagination.py example app. 
    ...
    pagination(
        State.fruit,
        render_item=lambda item, idx: rx.text(f"{idx} {item}"),
    ),

Subclass it an override the rendering functions if you like.

class CustomPagination(Pagination):

    @override
    @classmethod
    def render(cls) -> rx.Component:
        return rx.vstack(cls.render_controls(), cls.render_list())


custom_pagination = CustomPagination.create

So it basically works exactly like rx.foreach, but paginates the output.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages