NNuxt•Created by cak malik on 5/13/2024 in #❓・help Can't use ref for focus input (SOLVED)
why doesnt work with nuxt
this is my code
const searchInput = ref<HTMLInputElement | null>(null);
onMounted(() => {
searchInput.value?.focus();
});
and i got error
500
searchInput.value.focus is not a function