jonmiles/bootstrap-treeview — pull request #14 by maldoinc (2014-07-09 08:30:49+00:00)
Title: onNodeChange and onNodeChanging events

Adds `onNodeChange` and `onNodeChanging` events

`onNodeChange` is intended to be a replacement for `onNodeSelected` due to the fact that it also handles deselection by passing `null` to the `node` argument. However both are kept for compatibility.

`onNodeChanging` is triggered when the user wants to change nodes. It has 3 arguments: `currentNode`, `newNode` and a `change` function which will serve as a callback to allow for async tasks and to trigger the change or not. The function accepts a boolean parameter which if set to true will finalize the change.

Tell me what you think on the proposed changes.