Skip to content

Commit

Permalink
Merge pull request #68 from bleu-fi/joao/click-792-bug-fixes-for-appl…
Browse files Browse the repository at this point in the history
…ication-policy

Add items per page as parameter for pagination
  • Loading branch information
devjoaov authored Apr 27, 2024
2 parents b7d14d8 + d270257 commit 30fe382
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/DataTable/DataTablePagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ import { useTranslation, Trans } from "react-i18next";
import { Button, Select } from "#/components/ui";
import { useTableContext } from "./TableContext";

export function DataTablePagination() {
export function DataTablePagination({
itemsPerPageOptions = [10, 20, 30, 40, 50],
}) {
// @ts-expect-error TS(2339) FIXME: Property 'table' does not exist on type '{}'.
const { table } = useTableContext();

Expand All @@ -33,7 +35,7 @@ export function DataTablePagination() {
/>
</Select.SelectTrigger>
<Select.SelectContent side="top">
{[10, 20, 30, 40, 50].map((pageSize) => (
{itemsPerPageOptions.map((pageSize) => (
<Select.SelectItem key={pageSize} value={`${pageSize}`}>
{pageSize}
</Select.SelectItem>
Expand Down

0 comments on commit 30fe382

Please sign in to comment.