Browse Source

fix(crons): Reset cursor on search (#54349)

When using the search bar on the crons listing page, reset the cursor to
show first page of results
David Wang 1 year ago
parent
commit
b6cc323380
1 changed files with 1 additions and 1 deletions
  1. 1 1
      static/app/views/monitors/overview.tsx

+ 1 - 1
static/app/views/monitors/overview.tsx

@@ -72,7 +72,7 @@ export default function Monitors() {
   const monitorListPageLinks = monitorListHeaders?.('Link');
 
   const handleSearch = (query: string) => {
-    const currentQuery = router.location.query ?? {};
+    const currentQuery = {...(router.location.query ?? {}), cursor: undefined};
     router.push({
       pathname: location.pathname,
       query: normalizeDateTimeParams({...currentQuery, query}),