UNPKG

vuestic-ui

Version:
12 lines (11 loc) 594 B
import { Component, DefineComponent, Ref } from 'vue'; /** * Call onFocusOut when focus is out of `el` or any of his children using keyboard (or programmatically). * * @param el element to watch for focus out * @param onFocusOut callback to call when focus is out of `el` or any of his children * * @example * Can be used in elements with dropdown or modal, so when user changes focus to other element with `tab` key, dropdown will be closed. */ export declare const useKeyboardFocusOut: (el: Ref<HTMLElement | DefineComponent | undefined | Component>, onFocusOut: () => void) => void;