Open JojoMig opened 5 years ago
Hi, @JojoMig when you are using Button Actions
you already define the parameters that it uses in the parameter object that you pass to show
method.
buttons: [
['<button>Ok</button>', function (instance, toast) {
alert("Hello world!");
}, true], // true to focus
['<button>Close</button>', function (instance, toast) {
Vue.toast.hide(toast, {
transitionOut: 'fadeOutUp',
onClosing: function(instance, toast, closedBy){
console.info('closedBy: ' + closedBy); // The return will be: 'closedBy: buttonName'
}
});
}]
]
This solves your problem or are you trying to do something else? If so, please can you provide an example?
Hi, is there a way to pass a parameter (object or not) when a method is called, so any Button Actions can have this parameter to process? Like: this.$toast.show('Welcome!', 'Hey', {parameters}, notificationSystem.options.show); any help is appreciated thanks in advance