Skip to content

Commit

Permalink
fix(ripple): clear ripples on animation complete (nextui-org#1681)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrgarciadev authored Sep 23, 2023
1 parent 9ebaae0 commit 9d4c7ed
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/big-monkeys-notice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/ripple": patch
---

Fix #1656 clear ripples on animation complete
5 changes: 3 additions & 2 deletions packages/components/ripple/src/ripple.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ const Ripple: FC<RippleProps> = (props) => {
...style,
}}
transition={{duration}}
onAnimationEnd={() => onClear(ripple.key)}
onTransitionEnd={() => onClear(ripple.key)}
onAnimationComplete={() => {
onClear(ripple.key);
}}
{...motionProps}
/>
</AnimatePresence>
Expand Down

0 comments on commit 9d4c7ed

Please sign in to comment.