This commit is contained in:
Adria Navarro 2024-11-20 16:14:03 +01:00
parent 94f475c060
commit ed6d434843
1 changed files with 6 additions and 5 deletions

View File

@ -29,19 +29,20 @@ export async function searchView(
await context.ensureSnippetContext(true)
const searchOptions: RequiredKeys<SearchViewRowRequest> &
RequiredKeys<
Pick<RowSearchParams, "tableId" | "viewId" | "query" | "fields">
> = {
const searchOptions: RequiredKeys<RowSearchParams> = {
tableId: view.tableId,
viewId: view.id,
query: body.query || {},
fields: viewFields,
...getSortOptions(body, view),
limit: body.limit,
bookmark: body.bookmark,
bookmark: body.bookmark ?? undefined,
paginate: body.paginate,
countRows: body.countRows,
version: undefined,
disableEscaping: undefined,
indexer: undefined,
rows: undefined,
}
const result = await sdk.rows.search(searchOptions, {