shakee93 / vue-toasted

🖖 Responsive Touch Compatible Toast plugin for VueJS 2+
https://shakee93.github.io/vue-toasted/
MIT License
2.21k stars 194 forks source link

prevent closing with action #130

Closed cannap closed 5 years ago

cannap commented 5 years ago

HI,

how can i prevent closing the Toast when i use it with Action? i know i can prevent with push but i dont need push for that one :D my current solution is just increase the duration

   this.$toast.success(
              'Please check your Email and Confirm you Witdrawal',
              {
                duration: ms('3min'),
                action: {
                  text: 'Ok',

                  onClick: (e, toastObject) => {
                    toastObject.goAway(0)
                  }
                }
              }
            )
shakee93 commented 5 years ago

do you mean not to close the toast when action is clicked ?

 this.$toast.success(
              'Please check your Email and Confirm you Witdrawal',
              {
                duration: ms('3min'),
                action: {
                  text: 'Ok',

                  onClick: (e, toastObject) => {
                    // just comment this line and the action won't close the toast 
                    //  toastObject.goAway(0)
                  }
                }
              }
)