Skip to content

Commit

Permalink
Ensure that 'page' is an integer when switching with select element
Browse files Browse the repository at this point in the history
  • Loading branch information
pbking committed Feb 8, 2024
1 parent 3af6bbc commit 7d28fa6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ function PaginationFooter( { page, totalPages, setPage } ) {
options={ [ ...Array( totalPages ) ].map( ( e, i ) => {
return { label: i + 1, value: i + 1 };
} ) }
onChange={ ( newPage ) => setPage( newPage ) }
onChange={ ( newPage ) => setPage( parseInt( newPage ) ) }
/>
<Text>{ ` of ${ totalPages }` }</Text>
<Button
Expand Down

0 comments on commit 7d28fa6

Please sign in to comment.