We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf9e79e commit fd0965eCopy full SHA for fd0965e
packages/kit-headless/src/components/pagination/pagination.tsx
@@ -49,12 +49,16 @@ export const Pagination = component$<PaginationProps>(
49
}) => {
50
const visibleItems = useSignal<(string | number)[]>([]);
51
52
- visibleItems.value = usePagination(
53
- totalPages,
54
- selectedPage,
55
- siblingCount,
56
- boundaryCount,
57
- );
+ useTask$(({ track }) => {
+ track(() => [selectedPage, totalPages, siblingCount, boundaryCount]);
+
+ visibleItems.value = usePagination(
+ totalPages,
+ selectedPage,
58
+ siblingCount,
59
+ boundaryCount,
60
+ );
61
+ });
62
63
const isPrevButtonVisible = () => !hidePrevButton && selectedPage > 1;
64
const isNextButtonVisible = () => !hideNextButton && selectedPage !== totalPages;
0 commit comments