diff --git a/src/tabs/Tabs.tsx b/src/tabs/Tabs.tsx index 2fdd5af7..aa83caee 100644 --- a/src/tabs/Tabs.tsx +++ b/src/tabs/Tabs.tsx @@ -186,12 +186,13 @@ const Tabs: FC = (props) => { useEffect(() => { window.addEventListener('resize', moveToActiveTab, false); - setTimeout(() => { + const timeout = setTimeout(() => { moveToActiveTab(); }, 300); return () => { window.removeEventListener('resize', moveToActiveTab); + clearTimeout(timeout); }; // eslint-disable-next-line react-hooks/exhaustive-deps }, []);