mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-08 02:24:08 +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";
|
import "./pagination-footer.css";
|
||||||
|
|
||||||
const PaginationFooter = (props) => {
|
const PaginationFooter = (props) => {
|
||||||
let { offset, limit, visible, total, next, prev, handleLimit } = props;
|
const { offset, limit, visible, total, next, prev, handleLimit } = props;
|
||||||
return (
|
return (
|
||||||
<div className="pagination-footer">
|
<div className="pagination-footer">
|
||||||
<p>
|
<p>
|
||||||
Displaying {offset + 1}-{offset + visible} {total ? `of ${total}` : ""}
|
Displaying {visible ? offset + 1 : offset}-{offset + visible}{" "}
|
||||||
|
{total ? `of ${total}` : ""}
|
||||||
<br />
|
<br />
|
||||||
{offset >= 1 ? (
|
{offset >= 1 ? (
|
||||||
<button className="btn btn-sm btn-light spaced">
|
<button className="btn btn-sm btn-light spaced">
|
||||||
|
Reference in New Issue
Block a user