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

    auto close popup and parent

    Framework
    2
    3
    1214
    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.
    • P
      Pedro last edited by

      I have a page that opens a popup for editing data.
      When I click save/delete it opens a popup ‘Are you sure ??’

      this.$q.dialog({
        title: 'Deleted',
        message: 'Registro excluído com sucesso',
          ok: {
            push: true,
            ClosePopup: 2 (should this work ?)
          }
        })
      

      I’d like that when I click de Ok button on the second popup, it closes it self and the parent popup.

      Wifth q-dialog I can use the directive v-close-popup=2, but with the dialog plugin I couldn’t find how to use it.

      If this is not possible, how can I close the first popup ? I can click Ok on the second popup and close the first popup by code, but how ?

      Tks

      1 Reply Last reply Reply Quote 0
      • s.molinari
        s.molinari last edited by

        So you want a dialog over a dialog, and when the second/ top dialog closes, the first one closes too? Like this? https://codepen.io/smolinari/pen/VwYzZXZ?editors=1010

        With the Dialog plugin, you’d need to use the hide() method.

        Scott

        1 Reply Last reply Reply Quote 0
        • P
          Pedro last edited by Pedro

          I don’t know if that way will work in my case.
          I have a main app, the first dialog opens a component and the second dialog is just a dialog inside the component. The objects are in different scopes.
          I solved like this :

          main app opening the first dialog

              <q-dialog v-model="AtratDados" >
                <cad_atrativos :prop_linha_clicada="atrativo_clicado" :visivel="AtratDados" @evtFechaCadAtrativos="AtratDados=false" />
              </q-dialog>
          

          first dialog showing second dialog

                      this.$q.dialog({
                        title: 'Registro excluído',
                        message: 'Registro excluído com sucesso',
                        ok: {
                          push: true
                        }
                      }).onOk(() => {
                        this.$emit('evtFechaCadAtrativos')
                      })
          

          Thanks for your help

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