Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions src/pages/sponsors/sponsor-badge-scans/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2025 OpenStack Foundation
* Copyright 2026 OpenStack Foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand All @@ -25,6 +25,7 @@ import {
getBadgeScan,
saveBadgeScan
} from "../../../actions/sponsor-actions";
import { DEFAULT_CURRENT_PAGE } from "../../../utils/constants";
import EditBadgeScanPopup from "./edit-badge-scan-popup";

const SponsorBadgeScans = ({
Expand Down Expand Up @@ -54,7 +55,7 @@ const SponsorBadgeScans = ({
getBadgeScans(
sponsor.id,
searchTerm,
currentPage,
DEFAULT_CURRENT_PAGE,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although this would work since it's a safe state it will cause the UI to always take you to the first page whenever you enlarge the records per page. It's good enough for me, up to you @caseylocker

perPage,
order,
orderDir
Expand All @@ -67,7 +68,14 @@ const SponsorBadgeScans = ({
};

const handlePerPageChange = (newPerPage) => {
getBadgeScans(sponsor.id, term, currentPage, newPerPage, order, orderDir);
getBadgeScans(
sponsor.id,
term,
DEFAULT_CURRENT_PAGE,
newPerPage,
order,
orderDir
);
};

const handleSort = (key, dir) => {
Expand Down
Loading