Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Jay Mehta
/
zango-frontend
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Registry
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit cd057e9d
authored
2024-06-06 11:45:10 +0530
by
jaymehta
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
paginationissue
1 parent
952ec4d9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
components/listing/ListingItems.js
redux/actions/activityAction.js
components/listing/ListingItems.js
View file @
cd057e9
...
@@ -20,7 +20,7 @@ const ListingItems = ({ allActivitiesData, loading, gridClass, totalCount }) =>
...
@@ -20,7 +20,7 @@ const ListingItems = ({ allActivitiesData, loading, gridClass, totalCount }) =>
// }, [router]);
// }, [router]);
console
.
log
(
"endUser"
,
endUser
);
console
.
log
(
"endUser"
,
endUser
);
// console.log("router", router);
// console.log("router", router);
let
{
page
=
1
,
location
=
""
}
=
router
.
query
;
let
{
page
,
location
=
""
}
=
router
.
query
;
page
=
Number
(
page
);
page
=
Number
(
page
);
let
queryParams
;
let
queryParams
;
...
@@ -39,6 +39,8 @@ const ListingItems = ({ allActivitiesData, loading, gridClass, totalCount }) =>
...
@@ -39,6 +39,8 @@ const ListingItems = ({ allActivitiesData, loading, gridClass, totalCount }) =>
}
else
{
}
else
{
queryParams
.
append
(
"page"
,
pageNumber
);
queryParams
.
append
(
"page"
,
pageNumber
);
}
}
dispatch
(
getActivitiesByFilters
({
currentPage
:
e
}));
router
.
replace
({
router
.
replace
({
search
:
queryParams
.
toString
()
search
:
queryParams
.
toString
()
});
});
...
@@ -120,8 +122,6 @@ const ListingItems = ({ allActivitiesData, loading, gridClass, totalCount }) =>
...
@@ -120,8 +122,6 @@ const ListingItems = ({ allActivitiesData, loading, gridClass, totalCount }) =>
onChange
=
{
async
(
e
)
=>
{
onChange
=
{
async
(
e
)
=>
{
console
.
log
(
"log >"
,
e
);
console
.
log
(
"log >"
,
e
);
await
handlePagination
(
e
);
await
handlePagination
(
e
);
dispatch
(
getActivitiesByFilters
({
currentPage
:
e
}));
}}
}}
nextPageText
=
{
"›"
}
nextPageText
=
{
"›"
}
prevPageText
=
{
"‹"
}
prevPageText
=
{
"‹"
}
...
...
redux/actions/activityAction.js
View file @
cd057e9
...
@@ -441,6 +441,8 @@ export const getActivitiesByFilters =
...
@@ -441,6 +441,8 @@ export const getActivitiesByFilters =
};
};
if
(
currentPage
)
{
if
(
currentPage
)
{
query
.
pagination
[
"page"
]
=
Number
(
currentPage
);
query
.
pagination
[
"page"
]
=
Number
(
currentPage
);
}
else
{
query
.
pagination
[
"page"
]
=
1
;
}
}
console
.
log
(
"page query"
,
query
);
console
.
log
(
"page query"
,
query
);
if
(
category
)
{
if
(
category
)
{
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment