Skip to content

Commit

Permalink
fix(fuselage): Pagination number (#936)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo authored Dec 12, 2022
1 parent 410befb commit e421970
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/fuselage/src/components/Pagination/Pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const defaultShowingResultsLabel = ({
count
)} of ${count}`;

const itemsPerPageOptions = [25, 50, 100] as ItemsPerPage[];
export const Pagination = ({
count,
current = 0,
Expand All @@ -52,9 +53,6 @@ export const Pagination = ({
divider,
...props
}: PaginationProps) => {
const itemsPerPageOptions = ([25, 50, 100] as ItemsPerPage[]).filter(
(i) => i <= count
);
const hasItemsPerPageSelection = itemsPerPageOptions.length > 1;
const currentPage = Math.floor(current / itemsPerPage);
const pages = Math.ceil(count / itemsPerPage);
Expand Down

0 comments on commit e421970

Please sign in to comment.