A common design pattern is to scroll to the top of a list (or other long scrollable container) when the user taps on a toolbar. Implementing this behavior is pretty easy to do and only takes a few lines, but I found myself doing it so frequently that it made sense to create a plugin that takes care of it automatically.
As a simple example, consider the following:
Now, when the user "doubletap"s on the 'toolbar', the list will be scrolled to the top. This would achieve the same results, but is more verbose:
// config options go here...
// A really long list of items...
For fun we could listen to more events by passing `tapEvent` as an array of events, like:
tapSelector: 'toolbar', // or 'titlebar', or a function that returns a component
tapEvent: 'doubletap', // or an array of events
scrollAnimation: true // false to disable animation on scroll
For more details, check out the plugin over at GitHub.
tapEvent: ['doubletap', 'longpress']