Browse Source

fix(proguard-mappings): UI not updating when using pagination (#54820)

Priscila Oliveira 1 year ago
parent
commit
486801ee17
1 changed files with 10 additions and 4 deletions
  1. 10 4
      static/app/views/settings/projectProguard/index.tsx

+ 10 - 4
static/app/views/settings/projectProguard/index.tsx

@@ -44,13 +44,21 @@ function ProjectProguard({organization, location, router, params}: ProjectProgua
   } = useApiQuery<DebugFile[]>(
     [
       `/projects/${organization.slug}/${projectId}/files/dsyms/`,
-      {query: {query: location.query.query, file_formats: 'proguard'}},
+      {
+        query: {
+          query: location.query.query,
+          file_formats: 'proguard',
+          cursor: location.query.cursor,
+        },
+      },
     ],
     {
       staleTime: 0,
     }
   );
 
+  const mappingsPageLinks = getResponseHeader?.('Link');
+
   const associationsResults = useQueries({
     queries:
       mappings?.map(mapping => {
@@ -75,13 +83,11 @@ function ProjectProguard({organization, location, router, params}: ProjectProgua
 
   const associationsFetched = associationsResults.every(result => result.isFetched);
 
-  const mappingsPageLinks = getResponseHeader?.('Link');
-
   const handleSearch = useCallback(
     (query: string) => {
       router.push({
         ...location,
-        query: {...location.query, cursor: undefined, query},
+        query: {...location.query, cursor: undefined, query: query || undefined},
       });
     },
     [location, router]