diff --git a/src/datasource.ts b/src/datasource.ts index e21c812..36af503 100644 --- a/src/datasource.ts +++ b/src/datasource.ts @@ -434,7 +434,7 @@ export class QuickwitDataSource private makeLogContextDataRequest = (row: LogRowModel, options?: LogRowContextOptions) => { const direction = options?.direction || LogRowContextQueryDirection.Backward; - const searchAfterNs = row.dataFrame.fields.find((f) => f.name === 'sort')?.values.get(row.rowIndex) ?? [row.timeEpochNs] + const searchAfter = row.dataFrame.fields.find((f) => f.name === 'sort')?.values.get(row.rowIndex) ?? [row.timeEpochNs] const logQuery: Logs = { type: 'logs', @@ -444,7 +444,7 @@ export class QuickwitDataSource // Sorting of results in the context query sortDirection: direction === LogRowContextQueryDirection.Backward ? 'desc' : 'asc', // Used to get the next log lines before/after the current log line using sort field of selected log line - searchAfter: searchAfterNs, + searchAfter: searchAfter, }, };