fix: list pagination (#3121)

This commit is contained in:
Yevhen Shevchenko 2023-07-12 18:20:17 +03:00 committed by GitHub
parent 10ffbf7d81
commit 538261aa99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -271,6 +271,7 @@ function LogsExplorerViews(): JSX.Element {
const handleEndReached = useCallback(
(index: number) => {
if (isLimit) return;
if (logs.length < pageSize) return;
const lastLog = logs[index];
@ -368,7 +369,7 @@ function LogsExplorerViews(): JSX.Element {
useEffect(() => {
const shouldChangeView = isMultipleQueries || isGroupByExist;
if (panelType === 'list' && shouldChangeView) {
if (panelType === PANEL_TYPES.LIST && shouldChangeView) {
handleChangeView(PANEL_TYPES.TIME_SERIES);
}
}, [panelType, isMultipleQueries, isGroupByExist, handleChangeView]);