diff --git a/changes/27326-os-platform-reset-bug b/changes/27326-os-platform-reset-bug new file mode 100644 index 0000000000..e3c623ba51 --- /dev/null +++ b/changes/27326-os-platform-reset-bug @@ -0,0 +1 @@ +* Fleet UI: Fixed pagination resetting the platform filter on the Operating System UI table \ No newline at end of file diff --git a/frontend/pages/SoftwarePage/SoftwareOS/SoftwareOSTable/SoftwareOSTable.tsx b/frontend/pages/SoftwarePage/SoftwareOS/SoftwareOSTable/SoftwareOSTable.tsx index bb820dc04f..5eb263b2c4 100644 --- a/frontend/pages/SoftwarePage/SoftwareOS/SoftwareOSTable/SoftwareOSTable.tsx +++ b/frontend/pages/SoftwarePage/SoftwareOS/SoftwareOSTable/SoftwareOSTable.tsx @@ -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;