Skip to content

Commit

Permalink
fix: add collapsedHeight to useEffect dependency array
Browse files Browse the repository at this point in the history
  • Loading branch information
amaxalov committed May 8, 2022
1 parent 4a817fd commit ae37666
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export default function useCollapse({
})
})
}
}, [isExpanded])
}, [isExpanded, collapsedHeight])

const handleTransitionEnd = (e: TransitionEvent): void => {
// Sometimes onTransitionEnd is triggered by another transition,
Expand Down

0 comments on commit ae37666

Please sign in to comment.