mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[Session View] Empty session fix (#135390)
* fix to handle empty session bug * fix to handle empty session bug Co-authored-by: Karl Godard <karlgodard@elastic.co>
This commit is contained in:
parent
cff5be9da2
commit
05d4c2b907
1 changed files with 8 additions and 4 deletions
|
@ -61,10 +61,14 @@ export const useFetchSessionViewProcessEvents = (
|
|||
getNextPageParam: (lastPage, pages) => {
|
||||
const isRefetch = pages.length === 1 && jumpToCursor;
|
||||
if (isRefetch || lastPage.events.length >= PROCESS_EVENTS_PER_PAGE) {
|
||||
return {
|
||||
cursor: lastPage.events[lastPage.events.length - 1]['@timestamp'],
|
||||
forward: true,
|
||||
};
|
||||
const cursor = lastPage.events?.[lastPage.events.length - 1]?.['@timestamp'];
|
||||
|
||||
if (cursor) {
|
||||
return {
|
||||
cursor,
|
||||
forward: true,
|
||||
};
|
||||
}
|
||||
}
|
||||
},
|
||||
getPreviousPageParam: (firstPage, pages) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue