Show a confirmation dialog if model changes will be lost when navigating from a form
From 3.0.0 your project will require at least schemata@6
and support for a pug@3 runtime.
npm install --save @jackfish/form-cancel-delegate
On a Backbone view that has an initialModel
property:
var formCancelDelegate = require('@jackfish/form-cancel-delegate')(logger)
formCancelDelegate.call(view) // Needs to be executed in the context of the view
Built by developers at Clock.
Licensed under the New BSD License