From bdb5860ec31290d36b3bf5e11d3c1b2277744709 Mon Sep 17 00:00:00 2001 From: Oleksandr <44378645+justprogr@users.noreply.github.com> Date: Thu, 20 Jun 2024 17:46:02 -0600 Subject: [PATCH] fix: nested drawer does not trigger the parent drawer animation on close (#59) --- .changeset/breezy-suns-cross.md | 5 +++++ packages/vaul-vue/src/controls.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/breezy-suns-cross.md diff --git a/.changeset/breezy-suns-cross.md b/.changeset/breezy-suns-cross.md new file mode 100644 index 0000000..113a4e9 --- /dev/null +++ b/.changeset/breezy-suns-cross.md @@ -0,0 +1,5 @@ +--- +"vaul-vue": patch +--- + +Fixed nested drawer animation issue diff --git a/packages/vaul-vue/src/controls.ts b/packages/vaul-vue/src/controls.ts index 6a78242..83adb9a 100644 --- a/packages/vaul-vue/src/controls.ts +++ b/packages/vaul-vue/src/controls.ts @@ -429,7 +429,7 @@ export function useDrawer(props: UseDrawerProps & DialogEmitHandlers): DrawerRoo if (!drawerRef.value) return - // emitClose() + emitClose() set(drawerRef.value.$el, { transform: isVertical(direction.value) ? `translate3d(0, ${direction.value === 'bottom' ? '100%' : '-100%'}, 0)`