(Released Bugs) Fleet UI: Fix software query params bugs (#16682)

This commit is contained in:
RachelElysia 2024-02-09 09:16:44 -05:00 committed by GitHub
parent dbbb501358
commit 2a718087cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 7 deletions

View File

@ -0,0 +1,2 @@
- Fix URL query params to reset when switching tabs
- Fix vulnerable software dropdown from switching back to all teams

View File

@ -256,10 +256,8 @@ const SoftwarePage = ({ children, router, location }: ISoftwarePageProps) => {
const navigateToNav = useCallback(
(i: number): void => {
const navPath = softwareSubNav[i].pathname;
router.replace(
navPath.concat(location?.search || "").concat(location?.hash || "")
);
const navPath = softwareSubNav[i].pathname.concat(location?.hash || "");
router.replace(navPath);
},
[location, router]
);

View File

@ -207,9 +207,9 @@ const SoftwareTable = ({
routeTemplate: "",
queryParams: {
query,
teamId,
orderDirection,
orderKey,
team_id: teamId,
order_direction: orderDirection,
order_key: orderKey,
vulnerable: isFilterVulnerable,
page: 0, // resets page index
},