@jackfish/form-cancel-delegate

4.0.0 • Public • Published

@jackfish/form-cancel-delegate

Show a confirmation dialog if model changes will be lost when navigating from a form

WARNING

From 3.0.0 your project will require at least schemata@6 and support for a pug@3 runtime.

Installation

npm install --save @jackfish/form-cancel-delegate

Usage

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

Example:

Example

Credits

Built by developers at Clock.

Licence

Licensed under the New BSD License

/@jackfish/form-cancel-delegate/

    Package Sidebar

    Install

    npm i @jackfish/form-cancel-delegate

    Weekly Downloads

    1

    Version

    4.0.0

    License

    none

    Unpacked Size

    3.5 kB

    Total Files

    3

    Last publish

    Collaborators

    • jack828