serverside filter+paginate client resources table

This commit is contained in:
Fred KISSIE
2026-02-06 02:42:15 +01:00
parent 609ffccd67
commit 6c85171091
8 changed files with 183 additions and 118 deletions

View File

@@ -247,7 +247,7 @@ export async function listSites(
const baseQuery = querySitesBase().where(conditions);
// we need to add `as` so that drizzle filters the result as a subquery
const countQuery = db.$count(baseQuery.as("filtered_sites"));
const countQuery = db.$count(querySitesBase().where(conditions));
const siteListQuery = baseQuery
.limit(pageSize)