Skip to content

Commit 9f76c78

Browse files
committed
docs: update pagination
1 parent a5d4073 commit 9f76c78

File tree

5 files changed

+7
-4
lines changed

5 files changed

+7
-4
lines changed

packages/react/src/components/pagination/examples/page-size-control.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Pagination } from '@ark-ui/react/pagination'
22

33
export const PageSizeControl = () => {
44
return (
5-
<Pagination.Root count={100} pageSize={10}>
5+
<Pagination.Root count={100} defaultPageSize={10}>
66
<Pagination.Context>
77
{(pagination) => (
88
<div>

packages/solid/src/components/pagination/examples/page-size-control.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { For } from 'solid-js'
33

44
export const PageSizeControl = () => {
55
return (
6-
<Pagination.Root count={100} pageSize={10}>
6+
<Pagination.Root count={100} defaultPageSize={10}>
77
<Pagination.Context>
88
{(api) => (
99
<div>

packages/svelte/src/lib/components/pagination/examples/page-size-control.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { Pagination } from '@ark-ui/svelte/pagination'
33
</script>
44

5-
<Pagination.Root count={100} pageSize={10}>
5+
<Pagination.Root count={100} defaultPageSize={10}>
66
<Pagination.Context>
77
{#snippet render(pagination)}
88
<div>

packages/vue/src/components/pagination/examples/page-size-control.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Pagination } from '@ark-ui/vue/pagination'
33
</script>
44

55
<template>
6-
<Pagination.Root :count="100" :pageSize="10">
6+
<Pagination.Root :count="100" :defaultPageSize="10">
77
<Pagination.Context v-slot="pagination">
88
<div>
99
<div>

website/src/content/pages/components/pagination.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ Display the current page range information using the `pageRange` property. This
6161
Control the number of items per page dynamically using `setPageSize()`. This example shows how to integrate a native
6262
select element to change the page size.
6363

64+
> **Note:** For uncontrolled behavior, use `defaultPageSize` to set the initial value. For controlled behavior, use
65+
> `pageSize` and `onPageSizeChange` to programmatically manage the page size.
66+
6467
<Example id="page-size-control" />
6568

6669
### Link Pagination

0 commit comments

Comments
 (0)