Active page: {activePage}
@@ -226,7 +235,7 @@ export const CustomWithHooks = () => {
return (
);
@@ -236,7 +245,7 @@ export const CustomWithHooks = () => {
return (
);
diff --git a/packages/hooks/use-pagination/src/index.ts b/packages/hooks/use-pagination/src/index.ts
index c45104e483..2c87a4eddc 100644
--- a/packages/hooks/use-pagination/src/index.ts
+++ b/packages/hooks/use-pagination/src/index.ts
@@ -85,17 +85,15 @@ export function usePagination(props: UsePaginationProps) {
[total, activePage, onChangeActivePage],
);
- const next = () => (isRTL ? setPage(activePage - 1) : setPage(activePage + 1));
- const previous = () => (isRTL ? setPage(activePage + 1) : setPage(activePage - 1));
- const first = () => (isRTL ? setPage(total) : setPage(1));
- const last = () => (isRTL ? setPage(1) : setPage(total));
+ const next = () => setPage(activePage + 1);
+ const previous = () => setPage(activePage - 1);
+ const first = () => setPage(1);
+ const last = () => setPage(total);
const formatRange = useCallback(
(range: PaginationItemValue[]) => {
if (showControls) {
- return isRTL
- ? [PaginationItemType.NEXT, ...range, PaginationItemType.PREV]
- : [PaginationItemType.PREV, ...range, PaginationItemType.NEXT];
+ return [PaginationItemType.PREV, ...range, PaginationItemType.NEXT];
}
return range;