Alert - callback on dismissable x clicked

  • 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?

  • 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.


  • Hey @s-molinari ,

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

  • I would also appreciate this.

  • You both need to check your basics…

            :actions="[{label: 'Snooze', handler () {}}]"
            Some cool message for your users.
      data() {
        return {
          showAlert: false
      methods: {
        show() {
          this.showAlert = true
        hide() {
          this.showAlert = false

Log in to reply