diff --git a/package.json b/package.json index b9783db..a44b38e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "react-stay-at-bottom", "type": "module", - "version": "0.0.3", + "version": "1.0.0", "packageManager": "pnpm@9.10.0", "description": "A React hook that keeps a scrollable element at the bottom.", "author": "shlroland ", diff --git a/src/use-stay-at-bottom.ts b/src/use-stay-at-bottom.ts index 4522bc7..b7d052d 100644 --- a/src/use-stay-at-bottom.ts +++ b/src/use-stay-at-bottom.ts @@ -160,7 +160,9 @@ export function useStayAtBottom( useIsomorphicLayoutEffect(() => { if (initialStay) { - stayAtBottom() + if (autoStay) { + stayAtBottom() + } scrollToBottom() } }, [])