IO-747 Update CCC auto pagination
This commit is contained in:
@@ -160,11 +160,13 @@ export default function ContractsJobsComponent({
|
|||||||
);
|
);
|
||||||
|
|
||||||
const defaultCurrent = useMemo(() => {
|
const defaultCurrent = useMemo(() => {
|
||||||
return (
|
const page =
|
||||||
Math.round(
|
Math.floor(
|
||||||
((filteredData.findIndex((v) => v.id === selectedJob) || 0) + 1) / 10
|
(filteredData.findIndex((v) => v.id === selectedJob) || 0) / 3
|
||||||
) + 1
|
) + 1;
|
||||||
);
|
console.log("Page", page);
|
||||||
|
|
||||||
|
return page;
|
||||||
}, [filteredData, selectedJob]);
|
}, [filteredData, selectedJob]);
|
||||||
|
|
||||||
if (loading) return <LoadingSkeleton />;
|
if (loading) return <LoadingSkeleton />;
|
||||||
@@ -181,6 +183,7 @@ export default function ContractsJobsComponent({
|
|||||||
size="small"
|
size="small"
|
||||||
pagination={{
|
pagination={{
|
||||||
position: "top",
|
position: "top",
|
||||||
|
defaultPageSize: 3,
|
||||||
defaultCurrent: defaultCurrent,
|
defaultCurrent: defaultCurrent,
|
||||||
}}
|
}}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
|
|||||||
Reference in New Issue
Block a user