Cancel/Discard changes button
amenychtas opened this issue · comments
Andreas Menychtas commented
Is possible to use the generic button to cancel/discard changes? What is the recommended approach on this?
Keegan Lillo commented
yup.
In your custom function:
module.exports = function(minified) {
var clayConfig = this;
clayConfig.on(clayConfig.EVENTS.AFTER_BUILD, function() {
clayConfig.getItemById('cancel-btn').on('click', function() {
document.location.href = window.returnTo;
});
});
};
Andreas Menychtas commented
Great! Many thanks! 👍