Skip to content

Commit

Permalink
fixed infinte load issue on activity data table due to white spaces
Browse files Browse the repository at this point in the history
removed debug logging
  • Loading branch information
CyferShepard committed Jan 2, 2025
1 parent 6b1d593 commit b1e0b5b
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/pages/activity.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ function Activity() {
!data ||
(data.current_page && data.current_page !== currentPage) ||
(data.size && data.size !== itemCount) ||
(data.search ? data.search : "") !== debouncedSearchQuery
(data.search ? data.search : "") !== debouncedSearchQuery.trim()
) {
fetchHistory();
fetchLibraries();
Expand Down
1 change: 0 additions & 1 deletion src/pages/components/activity/activity-table.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ export default function ActivityTable(props) {
const handlePageChange = (updater) => {
setPagination((old) => {
const newPaginationState = typeof updater === "function" ? updater(old) : updater;
console.log(newPaginationState);
const newPage = newPaginationState.pageIndex; // MaterialReactTable uses 0-based index
if (props.onPageChange) {
props.onPageChange(newPage + 1);
Expand Down
2 changes: 1 addition & 1 deletion src/pages/components/item-info/item-activity.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function ItemActivity(props) {
!data ||
(data.current_page && data.current_page !== currentPage) ||
(data.size && data.size !== itemCount) ||
(data.search ? data.search : "") !== debouncedSearchQuery
(data.search ? data.search : "") !== debouncedSearchQuery.trim()
) {
fetchData();
}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/components/library/library-activity.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function LibraryActivity(props) {
!data ||
(data.current_page && data.current_page !== currentPage) ||
(data.size && data.size !== itemCount) ||
(data.search ? data.search : "") !== debouncedSearchQuery
(data.search ? data.search : "") !== debouncedSearchQuery.trim()
) {
fetchData();
}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/components/user-info/user-activity.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ function UserActivity(props) {
!data ||
(data.current_page && data.current_page !== currentPage) ||
(data.size && data.size !== itemCount) ||
(data.search ? data.search : "") !== debouncedSearchQuery
(data.search ? data.search : "") !== debouncedSearchQuery.trim()
) {
fetchHistory();
}
Expand Down

0 comments on commit b1e0b5b

Please sign in to comment.