parent
80cca9eca4
commit
6e69bd006d
1 changed files with 2 additions and 2 deletions
|
@ -38,7 +38,7 @@ export const PaginatingTableToolbar = ({
|
||||||
inputGroupOnChange,
|
inputGroupOnChange,
|
||||||
inputGroupOnClick,
|
inputGroupOnClick,
|
||||||
}: TableToolbarProps) => {
|
}: TableToolbarProps) => {
|
||||||
const page = first / max;
|
const page = Math.round(first / max);
|
||||||
const pagination = (variant: "top" | "bottom" = "top") => (
|
const pagination = (variant: "top" | "bottom" = "top") => (
|
||||||
<Pagination
|
<Pagination
|
||||||
isCompact
|
isCompact
|
||||||
|
@ -52,7 +52,7 @@ export const PaginatingTableToolbar = ({
|
||||||
perPage={max}
|
perPage={max}
|
||||||
onNextClick={(_, p) => onNextClick((p - 1) * max)}
|
onNextClick={(_, p) => onNextClick((p - 1) * max)}
|
||||||
onPreviousClick={(_, p) => onPreviousClick((p - 1) * max)}
|
onPreviousClick={(_, p) => onPreviousClick((p - 1) * max)}
|
||||||
onPerPageSelect={(_, m, f) => onPerPageSelect(f, m)}
|
onPerPageSelect={(_, m, f) => onPerPageSelect(f - 1, m)}
|
||||||
variant={variant}
|
variant={variant}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue