Fleet UI: Fix platform resetting on pagination of OS table (#27896)

This commit is contained in:
RachelElysia
2025-04-07 09:45:45 -04:00
committed by GitHub
parent fc63a2c237
commit df61e6b7f5
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -0,0 +1 @@
* Fleet UI: Fixed pagination resetting the platform filter on the Operating System UI table
@@ -124,9 +124,10 @@ const SoftwareOSTable = ({
order_direction: newTableQuery.sortDirection,
order_key: newTableQuery.sortHeader,
page: changedParam === "pageIndex" ? newTableQuery.pageIndex : 0,
platform,
};
},
[teamId]
[teamId, platform]
);
const onQueryChange = useCallback(
@@ -134,7 +135,6 @@ const SoftwareOSTable = ({
// we want to determine which query param has changed in order to
// reset the page index to 0 if any other param has changed.
const changedParam = determineQueryParamChange(newTableQuery);
// if nothing has changed, don't update the route. this can happen when
// this handler is called on the initial render.
if (changedParam === "") return;