vuestic-ui
Version:
Vue 3 UI Framework
17 lines (16 loc) • 405 B
JavaScript
import { watchEffect, nextTick } from "vue";
import { a as focusElement } from "../utils/focus.js";
import { u as unwrapEl } from "../utils/unwrapEl.js";
const useImmediateFocus = (el) => {
watchEffect(() => {
if (el.value) {
nextTick(() => {
focusElement(unwrapEl(el.value));
});
}
});
};
export {
useImmediateFocus as u
};
//# sourceMappingURL=useImmediateFocus.js.map