Skip to content

useTemplateRef with vue 3.5+ #17508

Sep 13, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

do u tried to specify the type of the component?

something like that:

import type { QDate } from 'quasar'

const qDate = useTemplateRef<QDate>('qDateRef')
onMounted(() => {
  if (qDate.value) {
    qDate.value.setView('Years')
  }
})

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@tomvdk
Comment options

Answer selected by tomvdk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants