When paginating, it's essential to be able to easily configure the
(specified by the
prop) and the
. In addition, you can also configure
, which controls the page sizes available in the pagination toolbar so the user can modify the page size by choosing a different value.
props - as a result, you don't have to update them to get pagination working as expected. This is the easiest way to get up & running quickly with
On the other hand, the
also offers the controlled
versions of those props:
. To make pagination work with those controlled props, make sure you update them using
To prove how you can have full control over the pagination with controlled
, take a look at the example below.
As seen in the example above, with the controlled
function is automatically called when any of those values change, so it's rather easy to implement custom pagination logic - if the current configuration props are not enough. At any time you can use
to render a custom component for pagination instead of the default PaginationToolbar