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

    Alert - callback on dismissable x clicked

    Help
    4
    5
    1331
    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.
    • C
      chrschdev last edited by

      Hi,

      i need to know the visibility state of my Alert which i have created programmatically.

      i want to show an Alert as a response of form validation, but i never want to show more than one Alert at the same time. so i need to know if the user manually has close the alert.

      can anyone help me?

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

        Check at the bottom of the docs.

        Alert also supports the v-model directive to receive a Boolean as a property. This determines the visibility of the QAlert (true means it’s visible).

        That should be what you need I think.

        Scott

        1 Reply Last reply Reply Quote 0
        • C
          chrschdev last edited by

          Hey @s-molinari ,

          yes, i saw this part in documentation. but i use the Alerts by programmatically way.

          1 Reply Last reply Reply Quote 0
          • L
            Lucien last edited by

            I would also appreciate this.

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

              You both need to check your basics…

                    <q-alert
                      color="positive"
                      icon="cloud"
                      enter="bounceInLeft"
                      leave="bounceOutRight"
                      position="top-right"
                      :actions="[{label: 'Snooze', handler () {}}]"
                      v-model="showAlert"
                    >
                      Some cool message for your users.
                    </q-alert>
              
                data() {
                  return {
                    showAlert: false
                  }
                },
                methods: {
                  show() {
                    this.showAlert = true
                  },
                  hide() {
                    this.showAlert = false
                  }
                }
              
              1 Reply Last reply Reply Quote 0
              • First post
                Last post