motiondivision / motionone

https://motion.dev
MIT License
2.86k stars 52 forks source link

[Feature] Add onExitComplete to Presence component in solid-js #181

Closed oSethoum closed 9 months ago

oSethoum commented 1 year ago

Is your feature request related to a problem? Please describe. the Presence component doesn't have an onExitComplete callback props

Describe the solution you'd like a way to add callback when the animation the exit transition finishes.

oSethoum commented 1 year ago

@mattgperry can this be added?

Nmans01 commented 1 year ago

+1 This would be useful for a SolidJS project I am working on. I want to be able to animate exits for items that are being deleted, and I want to be able to trigger the true deletion of an item only after its animation has been completed. This would ensure that the container component is not immediately re-rendered, which currently cancels the animation.

thetarnav commented 1 year ago

This should be very easy to add. As a workaround you probably can listen to motioncomplete on parent element and rely on event bubbling up. Also you can resolve the elements returned from <Presence> with children(), and observe as they change.

mattgperry commented 9 months ago

This is now a wontfix, see https://github.com/motiondivision/motionone/discussions/241

Hopefully future maintainers will have more time to take a look at this one!