I need to capture the even object of kt.stepper to conditionally perform some custom task and prevent the event stepper event from continue if condition not met, eg:
stepper.on("kt.stepper.click", function (event) {
doSomething(event)
});
function doSomething(eventObj) {
if (condition met) {
perrformTask;
} else {
eventObj.preventDefault();
}
}
I notice the event argument received is the stepper object instead of event object.
Thanks
You Meng
Hi,
No problem, I manage to work around by triggering the function from kt.stepper.changed.
Thanks.
You Meng
Hi,
Glad to hear that. All the best with your projects!
Regards,
Sean
Hi,
Yes, currently the event as a param is not supported. Could you please explain your requirement and we will try to suggest you a workaround?
You can attack a custom event handler to the stepper control elements since they are available in the HTML and you can handle it as you wish.
Regards,
Sean