Skip to content

Commit 5edfd11

Browse files
jennurzzacharo
authored andcommitted
pagination: navigate to previous page if current page is empty
1 parent 9894894 commit 5edfd11

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/lib/components/Pagination/Pagination.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ const Element = ({
104104
const size = options.size;
105105

106106
const { buildUID } = useContext(AppContext);
107+
if(currentPage > pages) onPageChange(pages);
107108

108109
return (
109110
<Overridable

0 commit comments

Comments
 (0)