A component that can help you paginate records, for example from a Repeater or a DataFrame.

Fields

NameTypeDescriptionOptions
PageNumberThe current page number.
    Page SizeNumberThe number of items per page.
      Total ItemsNumberThe total number of items
        Page Size OptionsTextA comma-separated list of page size options. If it’s empty, the user can’t change the page size. Set your default page size as the first option.
          Show All OptionTextShow an option to show all records.
          1. Yes
          2. No
          Jump ToTextShow an option to jump to a specific page.
          1. Yes
          2. No

          Events

          Low code usage

          This component can be declared directly in Python, using backend-driven UI.

          ui.Pagination(content={
                  "page": 0.0, # Union[float, str] 
                  "pageSize": 0.0, # Union[float, str] 
                  "totalItems": 0.0, # Union[float, str] 
                  "pageSizeOptions": "", # str 
                  "pageSizeShowAll": "no", # str [yes, no]
                  "jumpTo": "no", # str [yes, no]
              },
              handlers={
                  "wf-change-page": handle_event,
                  "wf-change-page-size": handle_event,
              }
          )
          

          A function, in this example handle_event, should be implemented in your code to handle events.

          def handle_event(state, payload, context, ui):
            pass
          

          Reference