Merge pull request 'Pagination Displayed Even When Records Are greater Than 20' (#368) from Kartik_Bug#1041 into Issues_Aug_2W
Reviewed-on: #368 Merged
This commit is contained in:
commit
aaa97532a4
@ -11,6 +11,7 @@ import eventBus from "../../services/eventBus";
|
||||
import AttendanceRepository from "../../repositories/AttendanceRepository";
|
||||
import { useAttendancesLogs } from "../../hooks/useAttendance";
|
||||
import { queryClient } from "../../layouts/AuthLayout";
|
||||
import { ITEMS_PER_PAGE } from "../../utils/constants";
|
||||
|
||||
const usePagination = (data, itemsPerPage) => {
|
||||
const [currentPage, setCurrentPage] = useState(1);
|
||||
@ -353,7 +354,7 @@ const AttendanceLog = ({ handleModalData, searchTerm }) => {
|
||||
<span className="text-secondary">No Pending Record Available !</span>
|
||||
</div>
|
||||
)}
|
||||
{filteredSearchData.length > 10 && (
|
||||
{filteredSearchData.length > ITEMS_PER_PAGE && (
|
||||
<nav aria-label="Page ">
|
||||
<ul className="pagination pagination-sm justify-content-end py-1">
|
||||
<li className={`page-item ${currentPage === 1 ? "disabled" : ""}`}>
|
||||
|
Loading…
x
Reference in New Issue
Block a user