diff --git a/src/api/services/configs.ts b/src/api/services/configs.ts index e33567792..403aaab76 100644 --- a/src/api/services/configs.ts +++ b/src/api/services/configs.ts @@ -289,10 +289,14 @@ export async function getConfigsChanges({ if (severity) { requestData.set("severity", severity); } - if (pageIndex && pageSize) { + if (pageIndex) { requestData.set("page", parseInt(pageIndex.toString()) + 1); + } + + if (pageSize) { requestData.set("page_size", pageSize); } + if (sortBy) { // for descending order, we need to add a "-" before the sortBy field requestData.set("sort_by", `${sortOrder === "desc" ? "-" : ""}${sortBy}`); diff --git a/src/pages/config/ConfigChangesPage.tsx b/src/pages/config/ConfigChangesPage.tsx index 0d5fbf31d..59c02b1fc 100644 --- a/src/pages/config/ConfigChangesPage.tsx +++ b/src/pages/config/ConfigChangesPage.tsx @@ -101,7 +101,7 @@ export function ConfigChangesPage() {