From 85b40b7164b6d5b46442a7a5b7d52f3a7f39023c Mon Sep 17 00:00:00 2001 From: Owen Date: Mon, 24 Aug 2026 14:05:31 -0400 Subject: [PATCH] Fix expanded row display issue on page change in LogDataTable --- src/components/LogDataTable.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/components/LogDataTable.tsx b/src/components/LogDataTable.tsx index 64833b0a0..6c17eb76c 100644 --- a/src/components/LogDataTable.tsx +++ b/src/components/LogDataTable.tsx @@ -313,6 +313,15 @@ export function LogDataTable({ } }, [currentPage, table, isServerPagination]); + // Collapse any expanded rows whenever the page changes, since row ids + // are reused across pages and would otherwise show the wrong content + // in the same expanded position. + const pageIndex = table.getState().pagination.pageIndex; + useEffect(() => { + setExpandedRows(new Set()); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [pageIndex]); + const handleTabChange = (value: string) => { if (disabled) return;