useScrollHide
A composable for handling scroll events to automatically hide dropdown/menu components when scrolling occurs.
Returns
componentRef(Ref) - Reference to the componentonShow(Function) - Call when component showsonHide(Function) - Call when component hides
Usage
vue
<template>
<q-select
ref="selectRef"
@popup-show="onShow"
@popup-hide="onHide"
/>
</template>
<script setup>
import { useScrollHide } from '@ftx/ui';
const { componentRef, onShow, onHide } = useScrollHide();
</script>Note
This composable is automatically used by FTxQSelect, FTxQMenu, and FTxBtnDropdown components, so you typically don't need to use it directly.