mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-07 10:04:07 +00:00
pagination: fix offset display when there are 0 results
This commit is contained in:
@@ -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 (
|
||||
<div className="pagination-footer">
|
||||
<p>
|
||||
Displaying {offset + 1}-{offset + visible} {total ? `of ${total}` : ""}
|
||||
Displaying {visible ? offset + 1 : offset}-{offset + visible}{" "}
|
||||
{total ? `of ${total}` : ""}
|
||||
<br />
|
||||
{offset >= 1 ? (
|
||||
<button className="btn btn-sm btn-light spaced">
|
||||
|
Reference in New Issue
Block a user