Skip to content

Commit 109abc7

Browse files
atrakhConvex, Inc.
authored andcommitted
dashboard: revert experimental pagination changes (#43502)
GitOrigin-RevId: a882bbacf247e4054daeb7483cc3287687f4cb2e
1 parent 326460c commit 109abc7

File tree

4 files changed

+14
-15
lines changed

4 files changed

+14
-15
lines changed

npm-packages/dashboard-common/src/features/data/components/Table/utils/useQueryFilteredTable.ts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
useState,
99
useContext,
1010
} from "react";
11-
import { usePaginatedQuery_experimental, PaginationStatus } from "convex/react";
11+
import { usePaginatedQuery, PaginationStatus } from "convex/react";
1212
import udfs from "@common/udfs";
1313
import { useCounter, useIdle, usePrevious } from "react-use";
1414
import { isFilterValidationError } from "system-udfs/convex/_system/frontend/lib/filters";
@@ -43,14 +43,13 @@ export const useQueryFilteredTable = (tableName: string) => {
4343

4444
const [pageSize] = useDataPageSize(selectedNent?.id ?? null, tableName);
4545

46-
const { results, loadMore, isLoading, status } =
47-
usePaginatedQuery_experimental(
48-
udfs.paginatedTableDocuments.default,
49-
isPaused
50-
? "skip"
51-
: { table: tableName, filters, componentId: selectedNent?.id ?? null },
52-
{ initialNumItems: pageSize },
53-
);
46+
const { results, loadMore, isLoading, status } = usePaginatedQuery(
47+
udfs.paginatedTableDocuments.default,
48+
isPaused
49+
? "skip"
50+
: { table: tableName, filters, componentId: selectedNent?.id ?? null },
51+
{ initialNumItems: pageSize },
52+
);
5453

5554
const [everHadResults, setEverHadResults] = useState(false);
5655
if (!everHadResults && status !== "LoadingFirstPage") {

npm-packages/dashboard-common/src/features/files/lib/usePaginatedFileMetadata.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { usePaginatedQuery_experimental } from "convex/react";
1+
import { usePaginatedQuery } from "convex/react";
22
import { useContext, useState } from "react";
33
import udfs from "@common/udfs";
44
import { DeploymentInfoContext } from "@common/lib/deploymentContext";
@@ -30,7 +30,7 @@ export function usePaginatedFileMetadata() {
3030
},
3131
};
3232

33-
const { results, loadMore, status } = usePaginatedQuery_experimental(
33+
const { results, loadMore, status } = usePaginatedQuery(
3434
udfs.fileStorageV2.fileMetadata,
3535
// If we're paused, don't show the live query.
3636
isPaused ? "skip" : args,

npm-packages/dashboard-common/src/features/schedules/lib/usePaginatedScheduledJobs.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { usePaginatedQuery_experimental } from "convex/react";
1+
import { usePaginatedQuery } from "convex/react";
22
import { useContext } from "react";
33
import udfs from "@common/udfs";
44
import { DeploymentInfoContext } from "@common/lib/deploymentContext";
@@ -21,7 +21,7 @@ export function usePaginatedScheduledJobs(udfPath: string | undefined) {
2121
componentId: useNents().selectedNent?.id ?? null,
2222
};
2323

24-
const { results, loadMore, status } = usePaginatedQuery_experimental(
24+
const { results, loadMore, status } = usePaginatedQuery(
2525
udfs.paginatedScheduledJobs.default,
2626
// If we're paused, don't show the live query.
2727
isPaused ? "skip" : args,

npm-packages/dashboard-common/src/lib/useDeploymentAuditLog.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { usePaginatedQuery_experimental } from "convex/react";
1+
import { usePaginatedQuery } from "convex/react";
22
import udfs from "@common/udfs";
33
import { Doc } from "system-udfs/convex/_generated/dataModel";
44
import { useEffect, useContext } from "react";
@@ -123,7 +123,7 @@ export function usePaginatedDeploymentEvents(
123123
}[],
124124
initialNumItems = 10,
125125
) {
126-
const { results, ...rest } = usePaginatedQuery_experimental(
126+
const { results, ...rest } = usePaginatedQuery(
127127
udfs.paginatedDeploymentEvents.default,
128128
filters ? { filters } : "skip",
129129
{

0 commit comments

Comments
 (0)