diff --git a/apps/platform/src/core/Model.ts b/apps/platform/src/core/Model.ts index c5db1057..b54e5bc3 100644 --- a/apps/platform/src/core/Model.ts +++ b/apps/platform/src/core/Model.ts @@ -213,7 +213,7 @@ export default class Model { .when(!!id?.length, qb => qb.whereIn('id', id!)) const makeCursor = (result: any, sort?: string) => { - if (!sort || sort === 'id') return `${result.id}` + if (!sort || sort === 'id' || sort === `${this.tableName}.id`) return `${result.id}` let sortCursor = result[sort] if (sortCursor instanceof Date) { sortCursor = formatISO(sortCursor) diff --git a/apps/platform/src/lists/ListService.ts b/apps/platform/src/lists/ListService.ts index 0b379819..4c1595f2 100644 --- a/apps/platform/src/lists/ListService.ts +++ b/apps/platform/src/lists/ListService.ts @@ -82,7 +82,9 @@ export const getListUsers = async (id: number, params: PageParams, projectId: nu b => b.leftJoin('users', 'user_list.user_id', 'users.id') .where('project_id', projectId) .where('list_id', id) - .select('users.*', 'user_list.created_at'), + .select('users.*', 'user_list.created_at', 'user_list.id', 'user_list.user_id'), + App.main.db, + (item) => ({ ...item, id: item.user_id }) as any, ) } diff --git a/apps/ui/src/ui/SearchTable.tsx b/apps/ui/src/ui/SearchTable.tsx index 57da0a23..f0a53907 100644 --- a/apps/ui/src/ui/SearchTable.tsx +++ b/apps/ui/src/ui/SearchTable.tsx @@ -191,11 +191,13 @@ export function SearchTable>({ setParams({ ...prevParams, ...onSort }) }} /> {results && ( - setParams({ ...params, cursor, page: 'prev' })} - onNext={cursor => setParams({ ...params, cursor, page: 'next' })} /> +
+ setParams({ ...params, cursor, page: 'prev' })} + onNext={cursor => setParams({ ...params, cursor, page: 'next' })} /> +
)} )