radix-vue / radix-vue

Vue port of Radix UI Primitives. An open-source UI component library for building high-quality, accessible design systems and web apps.

Home Page:https://radix-vue.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature]: Emit event when Dialog's animation are completed

noook opened this issue · comments

Describe the feature

Hi, contributor of @nuxt/ui here. As we are porting features from v2 to v3, I noticed something I am unable to port when transitioning from HeadlessUI to Radix.

When using modals programmatically, we listen to TransitionRoot @after-leave so we know we can reset the modal safely.

I understand that Presence is used under the hood, but I can't determine if I can use anything to hook into that.

Additional information

  • I intend to submit a PR for this feature.
  • I have already implemented and/or tested this feature.

Currently there's no way to hook into the animation end event. I believe this can be easily done if we dispatch a custom event for dev to capture and hook into

That's exactly what I had in mind, is it something easy to detect and dispatch ? I could do a PR but I'm not sure where to look for this