From ae376666247907f84c165adeb971275aebf0b51e Mon Sep 17 00:00:00 2001 From: Alexandr Makhalov Date: Sun, 8 May 2022 18:00:41 +0400 Subject: [PATCH] fix: add collapsedHeight to useEffect dependency array --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index a2ca500..e09610b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -111,7 +111,7 @@ export default function useCollapse({ }) }) } - }, [isExpanded]) + }, [isExpanded, collapsedHeight]) const handleTransitionEnd = (e: TransitionEvent): void => { // Sometimes onTransitionEnd is triggered by another transition,