Search: Fix pagination in the new search page (#51366)

* Fix pagination in the new search

* update betterer betterer betterer betterer betterer betterer

* revert packagejson
pull/51400/head
Artur Wierzbicki 3 years ago committed by GitHub
parent 342344bb03
commit c496b3e712
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      .betterer.results
  2. 13
      public/app/features/search/service/bluge.ts

@ -4473,10 +4473,10 @@ exports[`no explicit any`] = {
[24, 44, 3, "Unexpected any. Specify a different type.", "193409811"], [24, 44, 3, "Unexpected any. Specify a different type.", "193409811"],
[24, 78, 3, "Unexpected any. Specify a different type.", "193409811"] [24, 78, 3, "Unexpected any. Specify a different type.", "193409811"]
], ],
"public/app/features/search/service/bluge.ts:2088777935": [ "public/app/features/search/service/bluge.ts:3054830800": [
[38, 13, 3, "Unexpected any. Specify a different type.", "193409811"], [38, 13, 3, "Unexpected any. Specify a different type.", "193409811"],
[85, 9, 3, "Unexpected any. Specify a different type.", "193409811"], [85, 9, 3, "Unexpected any. Specify a different type.", "193409811"],
[134, 15, 3, "Unexpected any. Specify a different type.", "193409811"] [145, 15, 3, "Unexpected any. Specify a different type.", "193409811"]
], ],
"public/app/features/search/service/sql.ts:1428696565": [ "public/app/features/search/service/sql.ts:1428696565": [
[91, 36, 3, "Unexpected any. Specify a different type.", "193409811"] [91, 36, 3, "Unexpected any. Specify a different type.", "193409811"]

@ -131,7 +131,18 @@ async function doSearchQuery(query: SearchQuery): Promise<QueryResponse> {
const frame = ( const frame = (
await lastValueFrom( await lastValueFrom(
ds.query({ ds.query({
targets: [{ ...target, refId: 'Page', facet: undefined, from, limit: Math.max(limit, nextPageSizes) }], targets: [
{
...target,
search: {
...(target?.search ?? {}),
from,
limit: Math.max(limit, nextPageSizes),
},
refId: 'Page',
facet: undefined,
},
],
} as any) } as any)
) )
).data?.[0] as DataFrame; ).data?.[0] as DataFrame;

Loading…
Cancel
Save