From bc3bb47672dd5b47c072d147d07a69ee18a92ef3 Mon Sep 17 00:00:00 2001 From: Min RK Date: Fri, 8 Mar 2024 09:06:46 +0100 Subject: [PATCH] pagination: fix offset display when there are 0 results --- jsx/src/components/PaginationFooter/PaginationFooter.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jsx/src/components/PaginationFooter/PaginationFooter.jsx b/jsx/src/components/PaginationFooter/PaginationFooter.jsx index d0a8e8f8..803c85c8 100644 --- a/jsx/src/components/PaginationFooter/PaginationFooter.jsx +++ b/jsx/src/components/PaginationFooter/PaginationFooter.jsx @@ -5,11 +5,12 @@ import { FormControl } from "react-bootstrap"; import "./pagination-footer.css"; const PaginationFooter = (props) => { - let { offset, limit, visible, total, next, prev, handleLimit } = props; + const { offset, limit, visible, total, next, prev, handleLimit } = props; return (

- Displaying {offset + 1}-{offset + visible} {total ? `of ${total}` : ""} + Displaying {visible ? offset + 1 : offset}-{offset + visible}{" "} + {total ? `of ${total}` : ""}
{offset >= 1 ? (