fix(frontend): reset live log follow state on resume
This commit is contained in:
@@ -21,9 +21,13 @@ export function CentralStatus({ working }: { working: boolean }) {
|
||||
const followRef = useRef(true);
|
||||
|
||||
useLayoutEffect(() => {
|
||||
if (!working) {
|
||||
followRef.current = true;
|
||||
return;
|
||||
}
|
||||
const viewport = scrollRef.current;
|
||||
if (viewport && followRef.current) viewport.scrollTop = viewport.scrollHeight;
|
||||
}, [rowCount, tail]);
|
||||
}, [working, rowCount, tail]);
|
||||
|
||||
if (!working || rows.length === 0) return null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user