Allow Listview's onNavStart handler to prevent navigation
With most routing/navigational frameworks, you are given an opportunity to prevent navigation on an "onNavStart"-style event.
There does not appear to be any way to do this with the ListView.
In my case (using Angular), I'm using the ListView to provide hierarchical navigation in a modal.
For the terminal states, I assign a bogus "children" collection (something like "children: [{}]" ). When the user reaches one of these terminal states, I adjust the height of the listview so that only the "Back" button is visible. At the same time, a directive that contains the markup and logic for that particular terminal state's interface is ngIf-ed into the DOM.
One of the states has a "save" button, and is supposed to prompt/nag you if you have unsaved changes when you hit the Listview's "Back" item. Without the ability to prevent navigation, I have to resort to hacks (like attempting to undo the user's navigation by re-navigating to the appropriate terminal view from the onNavStart handler).
This can be actually done by returning false in the onItemTap event. (I just updated the docs, see: http://docs.mobiscroll.com/2-17-1/listview#!event-onItemTap).
Example:
onItemTap: function (item) {
if (item.hasClass('mbsc-lv-back') /* && some other condition */) {
return false;
}
}