Fix expanded row display issue on page change in LogDataTable

This commit is contained in:
Owen
2026-08-24 14:05:31 -04:00
parent 753cbd45d0
commit 85b40b7164
+9
View File
@@ -313,6 +313,15 @@ export function LogDataTable<TData, TValue>({
} }
}, [currentPage, table, isServerPagination]); }, [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) => { const handleTabChange = (value: string) => {
if (disabled) return; if (disabled) return;