setupHoldToClick calls stop on unmount

This commit is contained in:
thepaperpilot 2022-03-11 17:01:22 -06:00
parent 3682582fc3
commit 563bf76bee

View file

@ -14,6 +14,7 @@ import {
DefineComponent,
defineComponent,
isRef,
onUnmounted,
PropType,
ref,
Ref,
@ -113,6 +114,8 @@ export function setupHoldToClick(
}
}
onUnmounted(stop);
return { start, stop, handleHolding };
}