Navigation

    Quasar Framework

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    How to use $refs with Composition API and Typescript?

    Help
    2
    2
    68
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      sysRQ last edited by

      I have a QInput with ref=“email”, but with Composition API context.root.$refs it’s empty. I can access some properties declaring const email = ref(), and i can access values throug email.value.whatever, but can’t call functions like email.value.validate().

      How can do that?

      Thanks.

      1 Reply Last reply Reply Quote 0
      • A
        anli last edited by

        Maybe this helps you: https://markus.oberlehner.net/blog/refs-and-the-vue-3-composition-api/

        1 Reply Last reply Reply Quote 0
        • First post
          Last post