fix(core): push emit handlers into listeners set
This commit is contained in:
@@ -69,7 +69,8 @@ export function useHooks(emit: (...args: any[]) => void, hooks: Ref<FlowHooks>)
|
||||
emit(key, data)
|
||||
}
|
||||
|
||||
value.on(listener)
|
||||
// push into fns instead of using `on` to avoid overwriting default handlers - the emits should be called in addition to the default handlers
|
||||
value.fns.add(listener)
|
||||
|
||||
tryOnScopeDispose(() => {
|
||||
value.off(listener)
|
||||
|
||||
Reference in New Issue
Block a user