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,