No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

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

    Open a modal from another problem

    Help
    3
    5
    1983
    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
      Sujan Dev last edited by

      Hi,

      i am trying to open a modal from another modal. but getting a error :

      Uncaught TypeError: this.$refs.basicModal.open is not a function .

      my first modal is open perfectly.but when i trigger another modal from that modal
      i got the above error.

      can anyone plz help me ?

      1 Reply Last reply Reply Quote 0
      • mesqueeb
        mesqueeb last edited by

        did you try and console.log(this.$refs) and see if it’s there right before trying to open it?

        S 1 Reply Last reply Reply Quote 0
        • S
          Sujan Dev @mesqueeb last edited by Sujan Dev

          @mesqueeb plz see the attached image . i am trying to open serviceDetailModal modal which is present in $refs as you can see in console.

          0_1498466566474_nested modal error.png

          1 Reply Last reply Reply Quote 0
          • rstoenescu
            rstoenescu Admin last edited by

            If you use same ref name multiple times (you probably got that by using a v-for), then the ref is an Array of refs. Which is your case here. Notice it says Array(2).
            Call “open()” on the right index of this array.

            S 1 Reply Last reply Reply Quote 0
            • S
              Sujan Dev @rstoenescu last edited by

              @rstoenescu thank you very much :). now its working.

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