File tree 3 files changed +11
-0
lines changed
3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " vaul-vue " : patch
3
+ ---
4
+
5
+ feat: emits animationEnd
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import {
10
10
SCROLL_LOCK_TIMEOUT ,
11
11
useDrawer ,
12
12
} from ' ./controls'
13
+ import { TRANSITIONS } from ' ./constants'
13
14
14
15
const props = withDefaults (defineProps <DrawerRootProps >(), {
15
16
open: undefined ,
@@ -52,6 +53,10 @@ const emitHandlers = {
52
53
emitClose : () => emit (' close' ),
53
54
emitOpenChange : (o : boolean ) => {
54
55
emit (' update:open' , o )
56
+
57
+ setTimeout (() => {
58
+ emit (' animationEnd' , o )
59
+ }, TRANSITIONS .DURATION * 1000 )
55
60
},
56
61
}
57
62
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ export interface DrawerRootEmits {
65
65
( e : 'close' ) : void
66
66
( e : 'update:open' , open : boolean ) : void
67
67
( e : 'update:activeSnapPoint' , val : string | number ) : void
68
+ ( e : 'animationEnd' , open : boolean ) : void
68
69
}
69
70
70
71
export interface DialogEmitHandlers {
You can’t perform that action at this time.
0 commit comments