From 8bb254ae5b69c79bd22f3a5feb3c8d7ad52ba96c Mon Sep 17 00:00:00 2001 From: Yu Yi Yang Date: Sat, 10 Aug 2024 20:42:56 +0200 Subject: [PATCH] adjust scroll check --- src/Components/NetworkTable/NetworkTableBody.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Components/NetworkTable/NetworkTableBody.jsx b/src/Components/NetworkTable/NetworkTableBody.jsx index ad45478..7b37ce3 100644 --- a/src/Components/NetworkTable/NetworkTableBody.jsx +++ b/src/Components/NetworkTable/NetworkTableBody.jsx @@ -51,7 +51,7 @@ const NetworkTableBody = ({ height }) => { useEffect(() => { const outerRef = ref?.current?._outerRef; - if (outerRef.scrollTop + outerRef.offsetHeight + TABLE_ENTRY_HEIGHT === outerRef.scrollHeight) { + if (outerRef.scrollTop + outerRef.offsetHeight + TABLE_ENTRY_HEIGHT >= outerRef.scrollHeight) { ref.current._outerRef.scrollTop = outerRef.scrollHeight; } }, [data, ref]);