Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix: Fix infinite loading in the Cron jobs table (#45421)

Ivan Vasilov688834f1eb1e
diff --git a/apps/studio/data/database-cron-jobs/database-cron-jobs-infinite-query.ts b/apps/studio/data/database-cron-jobs/database-cron-jobs-infinite-query.ts
index 68c1cd1310d..c9e88a8d7c7 100644
--- a/apps/studio/data/database-cron-jobs/database-cron-jobs-infinite-query.ts
+++ b/apps/studio/data/database-cron-jobs/database-cron-jobs-infinite-query.ts
@@ -5,7 +5,9 @@ import { databaseCronJobsKeys } from './keys'
import { COST_THRESHOLD_ERROR, executeSql } from '@/data/sql/execute-sql-query'
import type { ResponseError, UseCustomInfiniteQueryOptions } from '@/types'
-export const CRON_JOBS_PAGE_LIMIT = 20
+// The value is intentionally high because the data grid needs to overflow so that `onScroll` event work and trigger
+// the infinite loading. If the value is too low, there won't be enough items to overflow and trigger the event.
+export const CRON_JOBS_PAGE_LIMIT = 40
export type DatabaseCronJobRunsVariables = {
projectRef?: string