Cancel the navigation state update correctly (#507)

The timeout was never canceled in case the tab changed, thus, it kept updating the navigation state for the previous tab and the new tab.
This commit is contained in:
schroda
2023-12-23 15:15:14 +01:00
committed by GitHub
parent e966b0328b
commit e4beafb11f

View File

@@ -103,7 +103,7 @@ const VerticalGrid = ({
);
}, 250);
};
useEffect(() => clearTimeout(persistGridStateTimeout.current), []);
useEffect(() => clearTimeout(persistGridStateTimeout.current), [location.key, persistGridStateTimeout.current]);
return (
<>